/**
 * Styles frontend
 * Keiza | Liste d'attente WooCommerce
 */

/* =====================================
   Bouton Liste d'attente
   ===================================== */

.kzwl-waitlist-button {
    padding: 10px 20px;
}

/* Wrapper pour l'alignement horizontal sur fiche produit */
.kzwl-waitlist-wrapper {
    display: block !important;
    margin-top: 10px !important;
    margin-left: 0 !important;
}

/* Classes de style Gutenberg */
.kzwl-btn-fill.button,
.kzwl-btn-fill,
a.kzwl-btn-fill {
    display: inline-block !important;
    padding: 12px 24px !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    text-align: center !important;
    text-decoration: none !important;
    border: 2px solid transparent !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.kzwl-btn-fill.button:hover,
.kzwl-btn-fill:hover,
a.kzwl-btn-fill:hover {
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-1px) !important;
}

.kzwl-btn-fill.button:active,
.kzwl-btn-fill:active,
a.kzwl-btn-fill:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.kzwl-btn-outline.button,
.kzwl-btn-outline,
a.kzwl-btn-outline {
    display: inline-block !important;
    padding: 12px 24px !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    text-align: center !important;
    text-decoration: none !important;
    background-color: transparent !important;
    border: 2px solid !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
}

.kzwl-btn-outline.button:hover,
.kzwl-btn-outline:hover,
a.kzwl-btn-outline:hover {
    text-decoration: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Lien liste d'attente dans les listings de produits */
.kzwl-waitlist-link-wrapper {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    margin-left: 8px !important;
}

.kzwl-waitlist-link {
    display: inline-block !important;
    font-size: 13px !important;
    font-family: inherit !important;
    text-decoration: none !important;
    transition: opacity 0.2s ease !important;
    padding: 8px 16px !important;
    margin: 0 !important;
}

.kzwl-waitlist-link:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* Message "Déjà inscrit" */
.kzwl-already-subscribed {
    display: inline-block;
    color: #15803d;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 10px;
}

.kzwl-already-subscribed .kzwl-checkmark {
    margin-right: 8px;
    color: #15803d;
}

/* Message de connexion requise */
.kzwl-login-required {
    margin: 15px 0;
    padding: 0;
}

.kzwl-login-link {
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
}

.kzwl-login-link:hover {
    text-decoration: underline;
}

/* Conteneur de message AJAX */
.kzwl-message {
    margin-top: 15px;
}

/* =====================================
   Formulaire d'inscription
   ===================================== */

.kzwl-form-container {
    max-width: 600px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.kzwl-product-info {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.kzwl-product-info h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    color: #333;
}

.kzwl-product-image {
    margin: 15px 0;
}

.kzwl-product-image img {
    max-width: 150px;
    height: auto;
    border-radius: 4px;
}

.kzwl-waitlist-form p {
    margin-bottom: 20px;
}

.kzwl-waitlist-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.kzwl-waitlist-form input[type="text"],
.kzwl-waitlist-form input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: #f9f9f9;
}

.kzwl-waitlist-form input[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}


/* =====================================
   Mes listes d'attente
   ===================================== */

.kzwl-my-waitlists {
    margin: 30px 0;
}

.kzwl-my-waitlists table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.kzwl-my-waitlists th {
    background: #f9f9f9;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e5e5e5;
}

.kzwl-my-waitlists td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.kzwl-my-waitlists tr:last-child td {
    border-bottom: none;
}

.kzwl-my-waitlists a:hover {
    text-decoration: underline;
}

/* =====================================
   Messages / Notices
   ===================================== */

.kzwl-notice {
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
    border-left: 4px solid;
}

.kzwl-notice p {
    margin: 0 0 10px 0;
}

.kzwl-notice p:last-child {
    margin-bottom: 0;
}

.kzwl-notice-success {
    background-color: #dcfce7;
    border-color: #15803d;
    color: #15803d;
}

.kzwl-notice-error {
    background-color: #fee;
    border-color: #d63638;
    color: #d63638;
}

.kzwl-notice-info {
    background-color: #e0f2fe;
    border-color: #0369a1;
    color: #0369a1;
}

.kzwl-notice .button {
    margin-top: 10px;
}

/* =====================================
   Responsive
   ===================================== */

@media (max-width: 768px) {
    .kzwl-waitlist-button {
        display: block;
        margin: 10px 0;
        text-align: center;
    }

    .kzwl-form-container {
        padding: 20px;
        margin: 20px 10px;
    }

    .kzwl-my-waitlists table,
    .kzwl-my-waitlists thead,
    .kzwl-my-waitlists tbody,
    .kzwl-my-waitlists th,
    .kzwl-my-waitlists td,
    .kzwl-my-waitlists tr {
        display: block;
    }

    .kzwl-my-waitlists thead tr {
        display: none;
    }

    .kzwl-my-waitlists tr {
        margin-bottom: 15px;
        border: 1px solid #e5e5e5;
        border-radius: 4px;
    }

    .kzwl-my-waitlists td {
        text-align: right;
        padding-left: 50%;
        position: relative;
    }

    .kzwl-my-waitlists td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        font-weight: 600;
        text-align: left;
    }
}


.btn {
    cursor: pointer;
}