/* ==========================================================================
   HospiDirect Auth Pages — Login + Registration Styles
   Shared components (.hd-auth-*) used by both pages.
   ========================================================================== */


/* ==========================================================================
   Section 1: Login Page Layout
   ========================================================================== */

/* CRITICAL: Remove body padding for full-viewport background on login page */
body.page-template-page-partner-login {
    padding-top: 0;
}

/* Also override the non-home first-child padding to avoid double spacing */
body.page-template-page-partner-login main > :first-child {
    padding-top: 0;
}

.hd-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8rem 1rem 5rem;
}

/* Full-viewport blurred background image */
.hd-login-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hd-login-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(6px);
    transform: scale(1.05); /* Prevents white edges from blur */
}

/* Dark overlay with additional subtle blur */
.hd-login-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* Glassmorphism login card */
.hd-login-card {
    position: relative;
    z-index: 20;
    width: 100%;
    max-width: 32rem;
    background: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--hd-shadow-glass);
    border-radius: 2rem;
    padding: 2.5rem 3.5rem;
    transition: box-shadow var(--hd-transition-base);
}

.hd-login-card:hover {
    box-shadow: var(--hd-shadow-layered);
}

/* Card header: icon circle, heading, subtitle */
.hd-login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.hd-login-icon-circle {
    width: 4rem;
    height: 4rem;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.hd-login-icon-circle .material-symbols-outlined {
    color: var(--hd-primary);
    font-size: 1.5rem;
}

.hd-login-header h1 {
    font-family: var(--hd-font-display);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 500;
    color: var(--hd-slate-900);
    margin-bottom: 0.5rem;
}

.hd-login-header p {
    color: var(--hd-slate-600);
    font-size: 0.875rem;
    font-weight: 300;
    letter-spacing: 0.025em;
    margin-bottom: 0;
}

/* Login form spacing between fields */
.hd-login-form .hd-auth-field {
    margin-bottom: 1.5rem;
}

/* Register link below card */
.hd-login-register-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.hd-login-register-link p {
    font-size: 0.875rem;
    color: var(--hd-slate-600);
    margin-bottom: 0;
}

.hd-login-register-link a {
    color: var(--hd-primary);
    font-weight: 700;
    text-decoration: none;
    margin-left: 0.25rem;
}

.hd-login-register-link a:hover {
    text-decoration: underline;
    color: var(--hd-primary-dark);
}


/* ==========================================================================
   Section 2: Shared Auth Form Components
   Used by both Login (03-01) and Registration (03-02) pages.
   ========================================================================== */

/* --- Form Fields --- */
.hd-auth-field {
    margin-bottom: 1.25rem;
}

.hd-auth-field label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--hd-slate-500);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

/* Header row: label + forgot password link side by side */
.hd-auth-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.hd-auth-field-header label {
    margin-bottom: 0;
}

/* Forgot password link */
.hd-auth-forgot {
    font-size: 0.6875rem;
    color: var(--hd-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--hd-transition-fast);
}

.hd-auth-forgot:hover {
    text-decoration: underline;
    color: var(--hd-primary-dark);
}

/* --- Input Wrapper (icon-prefixed) --- */
.hd-auth-input-wrap {
    position: relative;
}

.hd-auth-field-icon,
.hd-auth-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hd-slate-400);
    font-size: 20px;
    pointer-events: none;
}

.hd-auth-input-wrap input,
.hd-auth-input-wrap textarea,
.hd-auth-input-wrap select {
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e2e8f0;
    border-radius: var(--hd-radius-md);
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    font-family: var(--hd-font-sans);
    font-size: 0.875rem;
    color: var(--hd-charcoal);
    transition: all var(--hd-transition-fast);
    box-sizing: border-box;
}

.hd-auth-input-wrap input:focus,
.hd-auth-input-wrap textarea:focus,
.hd-auth-input-wrap select:focus {
    outline: none;
    border-color: var(--hd-primary);
    box-shadow: 0 0 0 1px var(--hd-primary);
}

.hd-auth-input-wrap input::placeholder,
.hd-auth-input-wrap textarea::placeholder {
    color: var(--hd-slate-400);
}

/* Inputs without icon (e.g., registration Company Name) */
.hd-auth-input-wrap.hd-no-icon input,
.hd-auth-input-wrap.hd-no-icon textarea,
.hd-auth-input-wrap.hd-no-icon select {
    padding-left: 1rem;
}

/* --- Gold Submit Button --- */
.hd-auth-btn {
    width: 100%;
    padding: 1rem;
    border-radius: var(--hd-radius-md);
    background: var(--hd-gradient-metallic-gold);
    color: white;
    font-family: var(--hd-font-sans);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    box-shadow: var(--hd-shadow-gold);
    transition: all var(--hd-transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.hd-auth-btn:hover {
    filter: brightness(1.1);
    box-shadow: var(--hd-shadow-glow);
    transform: scale(1.02);
}

.hd-auth-btn .material-symbols-outlined {
    font-size: 20px;
    transition: transform var(--hd-transition-fast);
}

.hd-auth-btn:hover .material-symbols-outlined {
    transform: translateX(4px);
}

/* --- Notice / Alert Boxes --- */
.hd-notice {
    padding: 0.875rem 1rem;
    border-radius: var(--hd-radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.hd-notice-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.hd-notice-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.hd-notice ul {
    margin: 0;
    padding-left: 1.25rem;
}

.hd-notice li {
    margin-bottom: 0.25rem;
}

.hd-notice li:last-child {
    margin-bottom: 0;
}


/* ==========================================================================
   Section 3: Responsive — Auth Pages
   ========================================================================== */

@media (max-width: 640px) {
    .hd-login-card {
        padding: 2rem 1.5rem;
        border-radius: 1.5rem;
    }

    .hd-login-page {
        padding: 6rem 1rem 3rem;
    }

    .hd-login-header h1 {
        font-size: 1.5rem;
    }

    .hd-login-icon-circle {
        width: 3.5rem;
        height: 3.5rem;
        margin-bottom: 1rem;
    }

    .hd-login-icon-circle .material-symbols-outlined {
        font-size: 1.25rem;
    }

    .hd-auth-btn {
        padding: 0.875rem;
    }
}


/* ==========================================================================
   Section 4: Registration Page Layout
   ========================================================================== */

/* CRITICAL: Remove body padding for full-viewport background on registration page */
body.page-template-page-registration {
    padding-top: 0;
}

body.page-template-page-registration main > :first-child {
    padding-top: 0;
}

.hd-registration-page {
    position: relative;
    overflow: hidden;
    padding: 140px 0 4rem;
    min-height: 100vh;
    background: var(--hd-bg-off-white);
}

/* Decorative gradient blobs (CSS-only) */
.hd-reg-bg-blobs {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.hd-reg-bg-blobs::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(197, 157, 95, 0.08) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    filter: blur(60px);
}

.hd-reg-bg-blobs::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
    bottom: -50px;
    left: -50px;
    filter: blur(60px);
}

/* Page heading */
.hd-reg-heading {
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 0 1rem;
    margin-bottom: 3rem;
}

.hd-reg-heading h1 {
    font-family: var(--hd-font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 600;
    color: var(--hd-slate-900);
    margin-bottom: 0.75rem;
}

.hd-reg-heading p {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--hd-slate-600);
    font-weight: 300;
    max-width: 40rem;
    margin: 0 auto;
}

/* Metallic gold text effect (used in heading span) */
.hd-metallic-gold-text {
    background: var(--hd-gradient-metallic-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ==========================================================================
   Section 5: Registration Split Layout
   ========================================================================== */

.hd-reg-layout {
    display: flex;
    gap: 3rem;
    max-width: 80rem;
    width: 85%;
    margin: 0 auto;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

/* Left: Benefits panel (5/12 width) */
.hd-reg-benefits {
    width: 41.667%;
    position: sticky;
    top: 8rem;
}

.hd-reg-benefits-card {
    background: rgba(255, 255, 255, 0.6);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    border-radius: 2rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--hd-shadow-layered);
}

.hd-reg-benefits-card h3 {
    font-family: var(--hd-font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--hd-slate-900);
    margin-bottom: 1.5rem;
}

/* Benefit items */
.hd-benefit-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.hd-benefit-item:last-of-type {
    margin-bottom: 0;
}

.hd-benefit-icon-box {
    width: 3rem;
    height: 3rem;
    min-width: 3rem;
    border-radius: var(--hd-radius-md);
    background: linear-gradient(135deg, var(--hd-bg-off-white), white);
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--hd-transition-base);
}

.hd-benefit-icon-box .material-symbols-outlined {
    color: var(--hd-primary);
    font-size: 1.25rem;
}

.hd-benefit-icon-box:hover {
    transform: scale(1.1);
}

.hd-benefit-text h4 {
    font-family: var(--hd-font-sans);
    font-size: 1rem;
    font-weight: 700;
    color: var(--hd-slate-900);
    margin-bottom: 0.25rem;
}

.hd-benefit-text p {
    font-size: 0.8125rem;
    color: var(--hd-slate-500);
    line-height: 1.5;
    margin-bottom: 0;
}

/* Social proof */
.hd-reg-social-proof {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.hd-reg-avatars {
    display: flex;
}

.hd-reg-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--hd-primary-light);
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--hd-primary-dark);
    margin-left: -0.5rem;
}

.hd-reg-avatar:first-child {
    margin-left: 0;
}

.hd-reg-social-proof span {
    font-size: 0.75rem;
    color: var(--hd-slate-500);
    font-weight: 500;
}


/* ==========================================================================
   Section 6: Registration Form Panel
   ========================================================================== */

/* Right: Form wrapper (7/12 width) */
.hd-reg-form-wrap {
    width: 58.333%;
    background: white;
    border-radius: 2rem;
    box-shadow: var(--hd-shadow-layered);
    padding: 2rem 2.5rem;
    border: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
}

/* Decorative watermark icon */
.hd-reg-watermark {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 6rem;
    opacity: 0.04;
    color: var(--hd-slate-400);
    pointer-events: none;
    z-index: 0;
}

/* Form grid: 2-column default */
.hd-reg-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

/* Full-width fields span both columns */
.hd-reg-col-full {
    grid-column: 1 / -1;
}

/* Registration field spacing (mirrors .hd-auth-field but scoped) */
.hd-reg-field {
    margin-bottom: 0;
}

.hd-reg-field label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--hd-slate-500);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

/* Textarea padding override (no icon offset needed for no-icon textareas) */
.hd-auth-input-wrap textarea {
    padding: 0.875rem 1rem;
    resize: vertical;
}

/* Registration form inputs: offset background instead of transparent */
.hd-reg-form-wrap .hd-auth-input-wrap input,
.hd-reg-form-wrap .hd-auth-input-wrap textarea {
    background: var(--hd-surface-offset);
}


/* ==========================================================================
   Section 7: GSTIN Validation Indicator
   ========================================================================== */

.hd-gstin-status {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.125rem;
    font-weight: 700;
}

.hd-gstin-valid {
    color: var(--hd-success);
}

.hd-gstin-invalid {
    color: var(--hd-error);
}

.hd-field-hint {
    font-size: 0.6875rem;
    color: var(--hd-slate-400);
    margin-top: 0.375rem;
}


/* ==========================================================================
   Section 8: Password Strength Meter
   ========================================================================== */

.hd-password-strength {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.hd-password-strength-bar {
    height: 0.25rem;
    flex: 1;
    border-radius: var(--hd-radius-full);
    background: rgba(197, 157, 95, 0.2);
    transition: background 0.3s;
}

.hd-pw-weak {
    background: var(--hd-error);
}

.hd-pw-fair {
    background: var(--hd-warning);
}

.hd-pw-good {
    background: var(--hd-info);
}

.hd-pw-strong {
    background: var(--hd-success);
}


/* ==========================================================================
   Section 9: Terms Checkbox + Login Link
   ========================================================================== */

.hd-auth-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    grid-column: 1 / -1;
}

.hd-auth-checkbox input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.125rem;
    accent-color: var(--hd-primary);
    cursor: pointer;
}

.hd-auth-checkbox label {
    font-size: 0.8125rem;
    color: var(--hd-slate-500);
    line-height: 1.4;
    cursor: pointer;
}

.hd-auth-checkbox a {
    color: var(--hd-primary);
    font-weight: 600;
    text-decoration: none;
}

.hd-auth-checkbox a:hover {
    text-decoration: underline;
}

/* Login link below registration form */
.hd-reg-login-link {
    text-align: center;
    grid-column: 1 / -1;
    font-size: 0.75rem;
    color: var(--hd-slate-400);
    margin-top: 0.5rem;
}

.hd-reg-login-link a {
    color: var(--hd-primary);
    font-weight: 700;
    text-decoration: none;
}

.hd-reg-login-link a:hover {
    text-decoration: underline;
}


/* ==========================================================================
   Section 10: Registration Success State (Pending Approval)
   ========================================================================== */

.hd-registration-pending {
    text-align: center;
    padding: 3rem 2rem;
}

.hd-pending-icon {
    width: 5rem;
    height: 5rem;
    background: rgba(197, 157, 95, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.hd-pending-icon .material-symbols-outlined {
    color: var(--hd-primary);
    font-size: 2.5rem;
}

.hd-registration-pending h2 {
    font-family: var(--hd-font-display);
    font-size: 1.5rem;
    color: var(--hd-slate-900);
    margin-bottom: 0.75rem;
}

.hd-registration-pending p {
    color: var(--hd-slate-600);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.hd-registration-pending a {
    color: var(--hd-primary);
    font-weight: 700;
    text-decoration: none;
}

.hd-registration-pending a:hover {
    text-decoration: underline;
}


/* ==========================================================================
   Section 11: Registration Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .hd-reg-layout {
        flex-direction: column;
        width: 95%;
    }

    .hd-reg-benefits,
    .hd-reg-form-wrap {
        width: 100%;
        position: static;
    }
}

@media (max-width: 640px) {
    .hd-reg-heading h1 {
        font-size: 1.75rem;
    }

    .hd-reg-form-grid {
        grid-template-columns: 1fr;
    }

    .hd-reg-form-wrap {
        padding: 1.5rem;
    }

    .hd-reg-benefits-card {
        padding: 1.5rem;
    }
}
