/* === MODALE - CONTENITORE E OVERLAY === */
.ff-modal-container {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
}

.ff-modal-container.is-open {
    display: block;
}

.ff-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

/* === SIDEBAR MODALE === */
.ff-modal-sidebar {
    position: fixed;
    top: 0;
    right: -550px;
    width: 100%;
    max-width: 550px;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 15px rgba(0,0,0,0.2);
    transition: right 0.4s ease-in-out;
    z-index: 10001;
    padding: 25px;
    overflow-y: auto;
}

.ff-modal-container.is-open .ff-modal-sidebar {
    right: 0;
}

.ff-modal-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    color: #888;
    text-decoration: none;
    line-height: 1;
}

.ff-modal-close:hover {
    color: #333;
}

/* === TABS === */
.ff-tabs-nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    border-bottom: 1px solid #ddd;
}

.ff-tabs-nav li {
    flex: 1;
}

.ff-tabs-nav a {
    display: block;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    color: #555;
    font-family: var(--feri-font-text) !important;
    font-weight: 300 !important;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.ff-tabs-nav a.active,
.ff-tabs-nav a:hover {
    color: #000;
    border-bottom-color: var(--feri-primary-hover);
}

.ff-tabs-nav a:focus {
    border: 0 !important;
}

.ff-tab-content {
    display: none;
}

.ff-tab-content.active {
    display: block;
}

/* === FORM - GENERALE === */
.ff-modal-sidebar form {
    margin-top: 20px;
}

.ff-modal-sidebar .login-form label,
.ff-modal-sidebar #registerform label,
#wppb-login-wrap label,
#wppb-register-user label {
    display: block;
    width: 100% !important;
    margin-bottom: 5px !important;
    font-family: var(--feri-font-buttons) !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #333;
}

.ff-modal-sidebar .input,
.ff-modal-sidebar input[type="text"],
.ff-modal-sidebar input[type="password"],
.ff-modal-sidebar input[type="email"],
.wppb-form-field input,
#wppb-register-user input {
    width: 100% !important;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 0 !important;
    margin-bottom: 15px;
}

/* === FORM - FOCUS STATE === */
#wppb-form-style-3-wrapper .wppb-form-text-field input:focus,
#wppb-form-style-3-wrapper .wppb-form-text-field textarea:focus,
#wppb-form-style-3-wrapper .wppb-woocommerce-customer-billing-address .wppb_billing_state input:focus,
#wppb-form-style-3-wrapper .wppb-woocommerce-customer-shipping-address .wppb_shipping_state input:focus,
#wppb-form-style-3-wrapper .pms-field-section .pms-billing-state input:focus,
#wppb-form-style-3-wrapper .wppb-subscription-plans .pms-group-name-field input:focus,
#wppb-form-style-3-wrapper .wppb-subscription-plans .pms-group-description-field textarea:focus,
#wppb-form-style-3-wrapper #pms-stripe-credit-card-details.StripeElement--focus,
#wppb-form-style-3-wrapper #pms-subscription-plans-discount input#pms_subscription_plans_discount_code:focus,
.wppb-user-forms input[type="text"]:focus,
.wppb-user-forms input[type="number"]:focus,
.wppb-user-forms input[type="email"]:focus,
.wppb-user-forms input[type="url"]:focus,
.wppb-user-forms input[type="password"]:focus,
.wppb-user-forms input[type="search"]:focus,
.wppb-user-forms textarea:focus {
    border-color: var(--feri-primary-hover) !important;
}

/* === FORM - INPUT HEIGHT === */
#wppb-form-style-3-wrapper .wppb-form-text-field input:not([type='radio']):not([type='checkbox']):not([type='submit']),
#wppb-form-style-3-wrapper .wppb-form-text-field textarea,
#wppb-form-style-3-wrapper .wppb-woocommerce-customer-billing-address .wppb_billing_state input,
#wppb-form-style-3-wrapper .wppb-woocommerce-customer-shipping-address .wppb_shipping_state input,
#wppb-form-style-3-wrapper .pms-field-section .pms-billing-state input:not(.chosen-search input),
#wppb-form-style-3-wrapper .wppb-subscription-plans .pms-group-name-field input,
#wppb-form-style-3-wrapper .wppb-subscription-plans .pms-group-description-field textarea,
#wppb-form-style-3-wrapper #pms-stripe-credit-card-details,
#wppb-form-style-3-wrapper #pms-subscription-plans-discount input#pms_subscription_plans_discount_code {
    height: 40px !important;
}

/* === BUTTONS === */
.ff-modal-sidebar .button-primary,
#wppb-loginform .login-submit input#wppb-submit,
.wppb-user-forms input[type="submit"] {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    border: 1px solid var(--feri-primary-hover) !important;
    border-radius: 0 !important;
    background: #0073aa;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.ff-modal-sidebar .button-primary:hover,
#wppb-loginform .login-submit input#wppb-submit:hover,
.wppb-user-forms input[type="submit"]:hover {
    background: #005a87;
}

/* === FORM - LAYOUT === */
#wppb-login-wrap p {
    display: flex;
    flex-direction: column;
}

#wppb-form-style-3-wrapper p.login-remember {
    overflow: visible !important;
    align-items: flex-start;
    flex-direction: row !important;
    text-transform: capitalize !important;
}

/* === MESSAGGI === */
.wppb-success, 
.wppb-error {
    animation: fadeInScale 0.5s ease-in-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#ff-register p.wppb-success,
#ff-register p.wppb-error {
    text-align: left !important;
    padding-left: 100px !important;
    display: block;
}

/* === COUNTDOWN === */
#countdown {
    font-weight: bold;
    color: #fff;
}
