/* ============================================================ */
/*                          Container                           */
/* ============================================================ */
.sr-container {
    max-width: 450px;
    margin: 30px auto;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-radius: 16px;
    padding: 35px 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ============================================================ */
/*               GLOBAL INPUT STYLES (KEEP THESE!)              */
/* ============================================================ */
.sr-container input[type="text"],
.sr-container input[type="email"],
.sr-container input[type="password"],
.sr-container input[type="tel"] {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border 0.2s, box-shadow 0.2s;
    background-color: #fafafa;
    box-sizing: border-box;
}
.sr-container input[type="text"],
.sr-container input[type="email"] {
    padding: 14px 10px 14px 14px;
}

.sr-container input[type="password"] {
    padding: 14px 40px 14px 14px; /* Right padding for SHOW HIDE BUTTON */
}
    
.sr-container input[type="tel"] {
    padding: 14px 40px 14px 50px; /* Right padding for icon */
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.sr-container input:focus {
    outline: none;
    border-color: #007cba !important;
    box-shadow: 0 0 0 3px rgba(0,124,186,0.1) !important;
}

/* ============================================================ */
/*                   FORM CSS sr-form-box                       */
/* ============================================================ */

.sr-form-box {
    display: none;
}
.sr-form-box.active {
    display: block;
}

.sr-container h2 {
    margin: 0 0 25px;
    font-weight: 600;
    font-size: 24px;
    text-align: center;
    color: #1a1a1a;
}

/* ============================================================ */
/*                          FLOATING LABELS                     */
/*  Floating Labels - Professional Cut-Through Border Effect    */
/* ============================================================ */
.sr-float-field {
    position: relative;
    margin-bottom: 38px; /* space for message */
}

.sr-float-field input {
    width: 100%;
    padding: 16px 40px 16px 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s;
    background: #fff;
    box-sizing: border-box;
    height: 56px;
    line-height: normal;
    -webkit-appearance: none;
    appearance: none;
}

.sr-float-field input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0,124,186,0.1);
}

.sr-float-field label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #757575;
    font-size: 15px;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    padding: 0;
    line-height: 1.2;
    z-index: 2;
}

/* The magic - cut through border effect */
.sr-float-field input:focus + label,
.sr-float-field input:not(:placeholder-shown) + label {
    top: 0 !important;
    transform: translateY(-50%) !important;
    font-size: 12px !important;
    color: #007cba !important;
    font-weight: 500 !important;
    background: #fff !important;
    padding: 0 6px !important;
    left: 12px !important;
    z-index: 3 !important;
}

/* When input has value but not focused */
.sr-float-field input:not(:placeholder-shown):not(:focus) + label {
    color: #666;
}

/* Hide placeholder text */
.sr-float-field input::placeholder {
    opacity: 0 !important;
    color: transparent !important;
}

/* Show placeholder only on focus */
.sr-float-field input:focus::placeholder {
    opacity: 0.5 !important;
    color: #ccc !important;
}

/* ============================================================ */
/*   STATIC CUT-THROUGH LABEL (PASSWORD FIELDS ONLY)             */
/* ============================================================ */

.sr-static-field {
    position: relative;
    margin-bottom: 28px;
}

/* Input */
.sr-static-field input {
    padding: 16px !important;
}

/* Label styled like "floating final state" */
.sr-static-field label {
    position: absolute !important;
    top: 0;
    left: 12px;
    transform: translateY(-50%);
    
    font-size: 12px;
    font-weight: 500;
    color: #007cba;
    
    background: #fff;
    padding: 0 6px;
    
    z-index: 3;
    pointer-events: none;
}
/* ============================================================ */
/*                         VALIDATION FIELD                     */
/*           Validation field icon adjustments - FIXED          */
/* ============================================================ */
.sr-validation-field {
    position: relative;
}

.sr-validation-field .sr-field-icon {
    position: absolute;
    right: 16px;
    top: 50%;  /* Fixed position - half of input height (56px / 2 = 28px) */
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Ensure label stays above icon in stacking order */
.sr-validation-field label {
    z-index: 2;
}

/* Validation field icon adjustments - FIXED ENDED HERE */

.sr-field-icon svg {
    width: 20px;
    height: 20px;
}

/* Adjust icon position when label is floating */
.sr-validation-field input:focus ~ .sr-field-icon,
.sr-validation-field input:not(:placeholder-shown) ~ .sr-field-icon {
    top: 50%;  /* Keep centered vertically */
    transform: translateY(-50%);
}

/* ========================================== */
/*                  FIELD MESSAGES            */
/* ========================================== */
.sr-field-message {
    position: absolute;
    bottom: -20px;
    left: 8px;
    
    font-size: 12px;
    color: #dc2626;
    font-weight: 400;
    
    min-height: 18px; /* prevents layout jump */
    margin-top: 5px;
    margin-left: 8px;
}

/* ========================================== */
/*             PHONE SECTION                  */
/* ========================================== */
.sr-phone-section {
    margin-bottom: 20px;
}

/* Phone field specific adjustments */
.sr-phone-field {
    margin-bottom: 0 !important;
    display: flex;
    align-items: stretch;
}

/* Phone input spacing only (prefix + button) */
.sr-phone-field input {
    height: 56px;
    padding-left: 65px;   /* space for +91 */
    padding-right: 130px; /* space for icon + button */
}

/* Hide prefix (+91) initially */
.sr-prefix {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%) translateX(-5px);

    font-size: 14px;
    font-weight: 500;
    color: #333;

    pointer-events: none;

    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 2;
}

/* Show on focus OR when user types */
.sr-phone-field input:focus ~ .sr-prefix,
.sr-phone-field input:not(:placeholder-shown) ~ .sr-prefix {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* Phone field icon position only */
.sr-phone-field .sr-field-icon {
    right: 80px; /* space before Send OTP button */
}

/* OTP input spacing (for verify button) */
#sr-otp {
    padding-right: 80px;
}

/* Inline buttons (Send OTP / Verify) */
.sr-inline-btn {
    position: absolute;
    right: 0px;
    top: 50%;
    transform: translateY(-50%);

    background: none;
    border: none;
    padding: 4px 8px;

    font-size: 13px;
    font-weight: 600;
    color: #007cba;

    cursor: pointer;
    white-space: nowrap;
    z-index: 2;
}

/* Hover */
.sr-inline-btn:hover:not(:disabled) {
    text-decoration: underline;
}

/* Disabled */
.sr-inline-btn:disabled {
    opacity: 0;
    cursor: not-allowed;
}

/* Verify button color variation */
.sr-verify-btn {
    color: #10b981;
}

/* OTP Section */
.sr-otp-section {
    margin-top: 15px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

/* Timer */
.sr-otp-timer {
    margin-top: 10px;
    font-size: 13px;
    color: #6b7280;
    text-align: center;
}
/* Phone Section End Here */

/* ============================================================ */
/*                   ROW LAYOUT                                 */
/* ============================================================ */
.sr-row {
    display: flex;
    gap: 15px;
}

.sr-col {
    flex: 1;
}

/* ============================================================ */
/*                   REMEMBER ROW                               */
/* ============================================================ */
.sr-remember-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0 20px;
    font-size: 14px;
}

.sr-remember-row a {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
}

/* ============================================================ */
/*                   BUTTONS                                    */
/* ============================================================ */
.sr-btn {
    display: flex;
    justify-content: center;  /* horizontal */
    align-items: center;      /* vertical */
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.sr-btn-primary {
    background: #1a1a1a;
    color: white;
}

.sr-btn-primary:hover {
    background: #007cba;
}

.sr-btn-secondary {
    background: #f3f4f6;
    color: #1a1a1a;
    border: 1.5px solid #e5e7eb;
}

.sr-btn-secondary:hover {
    background: #e5e7eb;
}

/* ============================================================ */
/*                   SEPARATOR & SWITCH                         */
/* ============================================================ */
.sr-separator {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: #9ca3af;
    font-size: 14px;
}

.sr-separator::before,
.sr-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.sr-separator span {
    padding: 0 15px;
}

.sr-switch-text {
    text-align: center;
    margin: 15px 0 10px;
    color: #6b7280;
}

/* ============================================================ */
/*                   MESSAGES                                   */
/* ============================================================ */
.sr-message {
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.sr-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.sr-message.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ============================================================ */
/*                   SVG Icon ANIMATIONS                        */
/* ============================================================ */
@keyframes sr-check-pop {
    0% { transform: translateY(-50%) scale(0); }
    80% { transform: translateY(-50%) scale(1.1); }
    100% { transform: translateY(-50%) scale(1); }
}

.sr-field-icon svg {
    animation: sr-check-pop 0.3s ease-out;
}


/* ============================================================ */
/*                   OVERRIDE THEME STYLES                      */
/* ============================================================ */
.sr-container input,
.sr-container input[type="text"],
.sr-container input[type="email"],
.sr-container input[type="password"],
.sr-container input[type="tel"] {
    box-shadow: none !important;
    background-image: none !important;
}

/* Fix for password field specifically */
.sr-float-field input[type="password"] {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    letter-spacing: normal !important;
}

/* Ensure password field label behaves same as others */
.sr-float-field input[type="password"]:focus + label,
.sr-float-field input[type="password"]:not(:placeholder-shown) + label {
    top: 0 !important;
    transform: translateY(-50%) !important;
    font-size: 12px !important;
    color: #007cba !important;
    font-weight: 500 !important;
    background: #fff !important;
    padding: 0 6px !important;
    left: 12px !important;
}

/* ======================================================== */
/*                       MOBILE RESPONSIVE                  */
/* ======================================================== */
@media (max-width: 480px) {
        
        .sr-container {
            max-width: 100%;
            margin: 10px 0;
            padding: 10px;
            border-radius: 8px;
        }
        
        .sr-container input[type="text"],
        .sr-container input[type="email"] {
            padding: 12px 5px 12px 8px !important;
        }
        
        .sr-container input[type="tel"] {
            padding: 12px 5px 12px 45px !important;
            font-size: 14px;
            font-weight: 500;
            color: #333;
        }
        
        .sr-container input[type="password"] {
            padding: 12px 30px 12px 8px !important;
        }
        
        .sr-float-field input {
            font-size: 14px;
            padding: 16px 40px 16px 14px;
        }
        
        .sr-float-field label {
            font-size: 14px;
            left: 14px;
        }
        
        .sr-float-field input:focus + label,
        .sr-float-field input:not(:placeholder-shown) + label {
            font-size: 11px;
            left: 10px;
        }
        
            .sr-prefix {
            left: 12px;
            font-size: 13px;
        }
        
        .sr-static-field label { font-size: 12px !important;}
        
        .sr-phone-field .sr-field-icon {
            right: 80px !important;
        }
        
        .sr-inline-btn {
            right: 5px;
            font-size: 12px;
            padding: 4px 5px;
        }
        
        .sr-row {
            gap: 10px;
        }
    }