/* =========================================================
   SOULFRESH COMPACT LOGIN POPUP MODAL
   Small, clean, modern & responsive modal
   ========================================================= */

/* Modal Overlay / Backdrop */
.sf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 28, 18, 0.65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sf-modal-overlay.sf-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Modal Card */
.sf-modal-card {
    position: relative;
    width: 100%;
    max-width: 380px;
    background: #ffffff;
    border-radius: 22px;
    padding: 30px 26px 26px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.22),
                0 4px 16px rgba(46, 125, 50, 0.08);
    border: 1px solid rgba(46, 125, 50, 0.12);
    transform: scale(0.92) translateY(12px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease;
    text-align: center;
}

.sf-modal-overlay.sf-active .sf-modal-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Close Button (X) */
.sf-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #F1F6F2;
    border: none;
    color: #4A6B50;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 10;
}

.sf-modal-close:hover {
    background: #2E7D32;
    color: #ffffff;
    transform: rotate(90deg);
}

/* Header Section */
.sf-modal-header {
    margin-bottom: 20px;
}

.sf-modal-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    margin: 0 auto 10px;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(46, 125, 50, 0.12));
}

.sf-modal-title {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #1B5E20;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.sf-modal-subtitle {
    font-family: 'Open Sans', sans-serif;
    font-size: 12.5px;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
}

/* Inline Dynamic Alert */
.sf-popup-alert {
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    line-height: 1.35;
    animation: sfAlertFade 0.25s ease;
}

@keyframes sfAlertFade {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.sf-popup-alert.alert-danger {
    background-color: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FCA5A5;
}

.sf-popup-alert.alert-success {
    background-color: #DCFCE7;
    color: #166534;
    border: 1px solid #86EFAC;
}

/* Form Groups */
.sf-form-group {
    margin-bottom: 15px;
    text-align: left;
}

.sf-form-label {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.sf-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sf-forgot-link {
    font-size: 12px;
    color: #2E7D32;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.sf-forgot-link:hover {
    color: #1B5E20;
    text-decoration: underline;
}

/* Input Container & Icons */
.sf-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.sf-input-icon {
    position: absolute;
    left: 14px;
    color: #8CA091;
    font-size: 14px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.sf-modal-input {
    width: 100%;
    padding: 11px 40px 11px 38px;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    font-size: 13.5px;
    font-family: 'Open Sans', sans-serif;
    color: #1E293B;
    background: #FAFCF9;
    transition: all 0.25s ease;
}

.sf-modal-input:focus {
    border-color: #2E7D32;
    background: #ffffff;
    box-shadow: 0 0 0 3.5px rgba(46, 125, 50, 0.14);
    outline: none;
}

.sf-modal-input:focus ~ .sf-input-icon {
    color: #2E7D32;
}

.sf-modal-input::placeholder {
    color: #94A3B8;
    font-size: 13px;
}

/* Password Toggle */
.sf-pwd-toggle {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #8CA091;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.sf-pwd-toggle:hover {
    color: #2E7D32;
}

/* Submit Button */
.sf-submit-btn {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.28);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sf-submit-btn:hover {
    background: linear-gradient(135deg, #276A2A 0%, #144918 100%);
    box-shadow: 0 10px 24px rgba(46, 125, 50, 0.38);
    transform: translateY(-1.5px);
}

.sf-submit-btn:active {
    transform: translateY(0);
}

.sf-submit-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

/* Footer Register Link */
.sf-modal-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #F1F5F0;
    font-size: 13px;
    color: #64748B;
}

.sf-register-link {
    color: #2E7D32;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sf-register-link:hover {
    color: #1B5E20;
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .sf-modal-card {
        padding: 24px 20px 20px;
        max-width: 92vw;
        border-radius: 18px;
    }

    .sf-modal-logo {
        width: 50px;
        height: 50px;
        margin-bottom: 8px;
    }

    .sf-modal-title {
        font-size: 18px;
    }

    .sf-modal-subtitle {
        font-size: 12px;
    }

    .sf-modal-input {
        padding: 10px 36px 10px 36px;
        font-size: 13px;
    }

    .sf-submit-btn {
        padding: 11px;
        font-size: 14px;
    }
}
