/*
 * StomaConnect 2026 - Formular înscriere workshop
 *
 * Fișier:
 * /wp-content/plugins/evenimente-bilete-stomaconnect/assets/css/workshop-booking.css
 *
 * Formular separat pentru workshop-uri.
 * Aspect apropiat de formularul actual EBS, dar compact și potrivit
 * pentru coloana din dreapta a paginii individuale a workshop-ului.
 */


/* =========================================================
   1. CONTAINER GENERAL
   ========================================================= */

.scwb-booking-container,
.scwb-booking-container * {
    box-sizing: border-box;
}

.scwb-booking-container {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    padding: 24px;

    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 12px;

    box-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.05),
        0 4px 6px -2px rgba(0, 0, 0, 0.02);

    color: #1e293b;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Oxygen,
        Ubuntu,
        Cantarell,
        "Open Sans",
        sans-serif;

    line-height: 1.4;
}


/* =========================================================
   2. ANTET
   ========================================================= */

.scwb-booking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 14px;

    padding-bottom: 16px;
    margin-bottom: 20px;

    border-bottom: 2px solid #f1f5f9;
}

.scwb-booking-header h3 {
    margin: 0;

    color: #1b263e;

    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}


/* =========================================================
   3. BADGE LOCURI
   ========================================================= */

.scwb-stock-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    padding: 8px 16px;

    border: none;
    border-radius: 999px;

    background: #f8c401;
    color: #1E253E;

    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;

    white-space: nowrap;
}

.scwb-stock-badge.scwb-stock-pending {
    border-color: #fde68a;

    background: #fffbeb;
    color: #92400e;
}

.scwb-stock-badge.scwb-stock-sold-out {
    border-color: #fecaca;

    background: #fef2f2;
    color: #991b1b;
}


/* =========================================================
   4. ZONA TARIF
   ========================================================= */

.scwb-pricing-info {
    position: relative;

    margin-bottom: 22px;
    padding: 16px 18px;

    overflow: hidden;

    border: 1px solid #e2e8f0;
    border-left: 4px solid #1b263e;
    border-radius: 8px;

    background: #f8fafc;

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.scwb-price-label {
    margin-bottom: 4px;

    color: #64748b;

    font-size: 13px;
    font-weight: 700;
}

.scwb-price-value {
    min-height: 34px;

    color: #1b263e;

    font-size: 26px;
    font-weight: 800;
    line-height: 1.15;

    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}

.scwb-price-message {
    margin-top: 5px;

    color: #64748b;

    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.45;
}


/* =========================================================
   5. STĂRI TARIF - NEUTRU / VERIFICARE
   ========================================================= */

.scwb-price-neutral .scwb-pricing-info {
    border-left-color: #cbd5e1;
}

.scwb-price-neutral .scwb-price-value {
    color: #94a3b8;
}

.scwb-price-checking .scwb-pricing-info {
    border-left-color: #f8c401;
    background: #fffdf4;
}

.scwb-price-checking .scwb-price-value {
    color: #b7791f;
}

.scwb-price-checking .scwb-price-message {
    color: #7c6517;
}


/* =========================================================
   6. STARE TARIF - WORKSHOP GRATUIT
   ========================================================= */

.scwb-price-included .scwb-pricing-info {
    border-color: #fde68a;
    border-left-color: #f8c401;

    background: #fffbeb;

    box-shadow:
        0 6px 18px -12px rgba(248, 196, 1, 0.45);
}

.scwb-price-included .scwb-price-value {
    color: #1b263e;
}

.scwb-price-included .scwb-price-message {
    color: #8a6511;
    font-weight: 700;
}


/* =========================================================
   7. STARE TARIF - PARTICIPANT STOMACONNECT
   ========================================================= */

.scwb-price-participant .scwb-pricing-info {
    border-left-color: #1b263e;

    background: #f8fafc;
}

.scwb-price-participant .scwb-price-value {
    color: #1b263e;
}

.scwb-price-participant .scwb-price-message {
    color: #475569;
    font-weight: 600;
}


/* =========================================================
   8. STARE TARIF - FĂRĂ BILET FIZIC
   ========================================================= */

.scwb-price-public .scwb-pricing-info {
    border-left-color: #d97706;

    background: #fffaf5;
}

.scwb-price-public .scwb-price-value {
    color: #b45309;
}

.scwb-price-public .scwb-price-message {
    color: #92400e;
    font-weight: 600;
}


/* =========================================================
   9. STARE EROARE
   ========================================================= */

.scwb-price-error .scwb-pricing-info {
    border-color: #fecaca;
    border-left-color: #dc2626;

    background: #fef2f2;
}

.scwb-price-error .scwb-price-value {
    color: #b91c1c;
}

.scwb-price-error .scwb-price-message {
    color: #991b1b;
    font-weight: 600;
}


/* =========================================================
   10. RÂNDURI FORMULAR
   ========================================================= */

.scwb-form-row {
    display: flex;

    gap: 16px;

    margin-bottom: 14px;
}

.scwb-input-field {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;

    min-width: 0;
}

.scwb-input-field label {
    margin-bottom: 6px;

    color: #475569;

    font-size: 13px;
    font-weight: 600;
}


/* =========================================================
   11. INPUTURI
   ========================================================= */

.scwb-input-field input {
    width: 100%;
    min-height: 42px;

    padding: 10px 12px;

    border: 1px solid #cbd5e1;
    border-radius: 6px;

    outline: none;

    background: #fdfdfd;
    color: #1e293b;

    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.scwb-input-field input::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.scwb-input-field input:hover {
    border-color: #94a3b8;
}

.scwb-input-field input:focus {
    border-color: #1b263e;

    background: #ffffff;

    box-shadow:
        0 0 0 3px rgba(27, 38, 62, 0.12);
}

.scwb-input-field input[aria-busy="true"] {
    background:
        linear-gradient(
            90deg,
            #f8fafc 25%,
            #ffffff 37%,
            #f8fafc 63%
        );

    background-size: 400% 100%;

    animation: scwb-input-loading 1.2s ease infinite;
}

@keyframes scwb-input-loading {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: 0 0;
    }
}


/* =========================================================
   12. DESCRIERE NRU
   ========================================================= */

.scwb-field-desc {
    display: block;

    margin-top: 5px;

    color: #64748b;

    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
}


/* =========================================================
   13. BUTON SUBMIT
   ========================================================= */

.scwb-submit-btn {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 48px;

    margin-top: 8px;
    padding: 14px 20px;

    overflow: hidden;

    border: none;
    border-radius: 8px;

    background: #f8c401;
    color: #1b263e;

    box-shadow:
        0 8px 20px -10px rgba(248, 196, 1, 0.65);

    cursor: pointer;

    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.12s ease,
        opacity 0.2s ease;
}

.scwb-submit-btn:hover:not(:disabled) {
    background: #39466E;
    color: #ffffff;

    box-shadow:
        0 10px 24px -10px rgba(57, 70, 110, 0.45);

    transform: translateY(-1px);
}

.scwb-submit-btn:active:not(:disabled) {
    transform: scale(0.985);
}

.scwb-submit-btn:focus-visible {
    outline: 3px solid rgba(248, 196, 1, 0.35);
    outline-offset: 3px;
}


/* =========================================================
   14. BUTON DEZACTIVAT
   ========================================================= */

.scwb-submit-btn:disabled,
.scwb-submit-btn.is-disabled {
    background: #e2e8f0;
    color: #94a3b8;

    box-shadow: none;

    cursor: not-allowed;

    opacity: 0.85;

    transform: none;
}


/* =========================================================
   15. LOADING SUBMIT
   ========================================================= */

.scwb-submit-btn.loading .scwb-btn-text {
    visibility: hidden;
}

.scwb-btn-loader {
    display: none;
}

.scwb-submit-btn.loading .scwb-btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;

    display: block;

    width: 20px;
    height: 20px;

    margin-top: -10px;
    margin-left: -10px;

    border: 3px solid rgba(27, 38, 62, 0.2);
    border-top-color: #1b263e;
    border-radius: 50%;

    animation: scwb-spin 0.8s linear infinite;
}

@keyframes scwb-spin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   16. MESAJ CAPACITATE NECUNOSCUTĂ / SOLD OUT
   ========================================================= */

.scwb-unavailable-message {
    padding: 18px 20px;

    border: 1px solid #fde68a;
    border-radius: 8px;

    background: #fffbeb;
    color: #92400e;

    text-align: center;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

.scwb-unavailable-message.scwb-unavailable-sold-out {
    border-color: #fecaca;

    background: #fef2f2;
    color: #991b1b;
}


/* =========================================================
   17. AVERTISMENT ADMIN
   ========================================================= */

.scwb-admin-warning {
    width: 100%;

    padding: 14px 16px;

    border: 1px dashed #f59e0b;
    border-radius: 8px;

    background: #fffbeb;
    color: #92400e;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}


/* =========================================================
   18. STARE GENERALĂ VERIFICARE AJAX
   ========================================================= */

.scwb-booking-container.is-checking-price .scwb-pricing-info {
    position: relative;
}

.scwb-booking-container.is-checking-price .scwb-pricing-info::after {
    content: "";

    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 2px;

    background:
        linear-gradient(
            90deg,
            transparent,
            #f8c401,
            transparent
        );

    background-size: 200% 100%;

    animation: scwb-price-line 1s linear infinite;
}

@keyframes scwb-price-line {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}


/* =========================================================
   19. ELEMENTOR / TEME - RESETURI DE SIGURANȚĂ
   ========================================================= */

.scwb-booking-container button,
.scwb-booking-container input {
    font-family: inherit;
}

.scwb-booking-container button {
    text-transform: none;
    letter-spacing: normal;
}

.scwb-booking-container input[type="text"],
.scwb-booking-container input[type="email"] {
    margin: 0;
}

.scwb-booking-container p,
.scwb-booking-container h3 {
    word-break: normal;
}


/* =========================================================
   20. TABLETĂ
   ========================================================= */

@media (max-width: 1024px) {

    .scwb-booking-container {
        max-width: 100%;
    }

}


/* =========================================================
   21. MOBIL
   ========================================================= */

@media (max-width: 580px) {

    .scwb-booking-container {
        padding: 20px 16px;

        border-radius: 10px;
    }

    .scwb-booking-header {
        align-items: flex-start;
        flex-direction: column;

        gap: 10px;
    }

    .scwb-booking-header h3 {
        font-size: 19px;
    }

    .scwb-stock-badge {
        white-space: normal;
    }

    .scwb-form-row {
        flex-direction: column;

        gap: 12px;

        margin-bottom: 12px;
    }

    .scwb-pricing-info {
        padding: 14px 15px;
    }

    .scwb-price-value {
        font-size: 24px;
    }

    .scwb-submit-btn {
        min-height: 50px;

        font-size: 14.5px;
    }

}


/* =========================================================
   22. TELEFOANE FOARTE MICI
   ========================================================= */

@media (max-width: 380px) {

    .scwb-booking-container {
        padding: 18px 14px;
    }

    .scwb-booking-header h3 {
        font-size: 18px;
    }

    .scwb-input-field input {
        font-size: 13.5px;
    }

}


/* =========================================================
   23. REDUCERE ANIMAȚII - ACCESIBILITATE
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .scwb-booking-container *,
    .scwb-booking-container *::before,
    .scwb-booking-container *::after {
        scroll-behavior: auto !important;

        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }

}
