/* ==========================================================================
   Reswip Theme — global resets
   ========================================================================== */

body.reswip-auth {
    margin: 0;
    padding: 0;
}

body.reswip-auth #wpadminbar {
    display: none !important;
}

body.reswip-auth.admin-bar {
    margin-top: 0 !important;
}

html {
    margin-top: 0 !important;
}

body.reswip-auth .site-header,
body.reswip-auth .site-footer,
body.reswip-auth .ehf-header,
body.reswip-auth .ehf-footer {
    display: none !important;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

*:focus-visible {
    outline: none;
}

button {
    cursor: pointer;
}


/* ==========================================================================
   Login page — native CSS fallback so the page looks right even if Tailwind
   CDN fails to apply (network blocked, JIT not picking up classes, etc).
   All rules scoped to body.reswip-login to avoid touching other pages.
   ========================================================================== */

body.reswip-login {
    background: #F4F7FB;
    color: #1A1F2C;
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

/* Centered main */
body.reswip-login main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
}

/* Container max-width */
body.reswip-login main > div {
    width: 100%;
    max-width: 28rem; /* 448px */
}

/* The white card */
body.reswip-login main > div > div {
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04),
                0 1px 2px 0 rgba(0, 0, 0, 0.02);
    padding: 32px;
}

@media (min-width: 640px) {
    body.reswip-login main > div > div {
        padding: 40px;
    }
}

/* Headings */
body.reswip-login h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1A1F2C;
    text-align: center;
    margin: 0;
}

/* Labels */
body.reswip-login label[for="user_login"],
body.reswip-login label[for="user_pass"] {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1A1F2C;
    margin-bottom: 8px;
}

/* Inputs */
body.reswip-login input[type="email"],
body.reswip-login input[type="password"],
body.reswip-login input[type="text"]:not([type="hidden"]) {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    background: #FFFFFF;
    color: #1A1F2C;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
}

body.reswip-login input[type="password"] {
    padding-right: 48px;          /* room for the eye toggle */
    background: rgba(239, 246, 255, 0.4);
}

body.reswip-login input[type="email"]::placeholder,
body.reswip-login input[type="password"]::placeholder {
    color: #9CA3AF;
}

body.reswip-login input[type="email"]:focus,
body.reswip-login input[type="password"]:focus {
    border-color: transparent;
    box-shadow: 0 0 0 2px #7C3AED;
}

/* Password wrapper (relative to position the eye absolutely) */
body.reswip-login [data-reswip-pwd-wrapper] {
    position: relative;
}

/* Eye toggle button — pinned to the right edge of the input */
body.reswip-login [data-reswip-pwd-toggle] {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: 0;
    color: #9CA3AF;
    cursor: pointer;
    transition: color 0.2s;
}

body.reswip-login [data-reswip-pwd-toggle]:hover {
    color: #1A1F2C;
}

body.reswip-login [data-reswip-pwd-toggle] svg.hidden {
    display: none;
}

/* Submit button */
body.reswip-login button[type="submit"] {
    width: 100%;
    padding: 12px 16px;
    border: 0;
    border-radius: 12px;
    background: #1A1F2C;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

body.reswip-login button[type="submit"]:hover {
    background: #0F1419;
}

body.reswip-login button[type="submit"]:active {
    transform: translateY(1px);
}

body.reswip-login button[type="submit"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #1A1F2C;
}

/* Forgot password link */
body.reswip-login a[href*="lostpassword"],
body.reswip-login a[href*="lost-password"],
body.reswip-login a[href*="forgot"] {
    color: #3B82F6;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

body.reswip-login a[href*="lostpassword"]:hover,
body.reswip-login a[href*="lost-password"]:hover,
body.reswip-login a[href*="forgot"]:hover {
    text-decoration: underline;
}

/* Vertical spacing inside the form (replaces Tailwind's space-y-5) */
body.reswip-login form > * + * {
    margin-top: 20px;
}

/* Flash messages */
body.reswip-login [role="alert"] {
    margin-bottom: 20px;
    border-radius: 8px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    padding: 12px 16px;
    font-size: 14px;
    color: #B91C1C;
}

body.reswip-login [role="status"] {
    margin-bottom: 20px;
    border-radius: 8px;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    padding: 12px 16px;
    font-size: 14px;
    color: #047857;
}

/* Logo + heading block spacing */
body.reswip-login form {
    display: block;
}

body.reswip-login .text-center {
    text-align: center;
}



/* ==========================================================================
   Dark portal — AI-style modern aesthetic
   ========================================================================== */

body.reswip-portal {
    background: #08090D !important;
    color: #F4F4F8;
}

.reswip-dark-portal {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    color: #F4F4F8;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
}


/* ---------- Background layers ---------- */

.rdp-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: radial-gradient(ellipse at top, #0F1424 0%, #08090D 60%, #08090D 100%);
}

/* Floating gradient orbs */
.rdp-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    will-change: transform;
    pointer-events: none;
}

.rdp-orb-purple {
    width: 620px;
    height: 620px;
    top: -180px;
    left: -160px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.55) 0%, rgba(124, 58, 237, 0) 70%);
    animation: rdp-float-1 26s ease-in-out infinite;
}

.rdp-orb-orange {
    width: 540px;
    height: 540px;
    bottom: -180px;
    right: -160px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.45) 0%, rgba(249, 115, 22, 0) 70%);
    animation: rdp-float-2 32s ease-in-out infinite;
}

.rdp-orb-blue {
    width: 460px;
    height: 460px;
    top: 45%;
    left: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.35) 0%, rgba(59, 130, 246, 0) 70%);
    animation: rdp-float-3 38s ease-in-out infinite;
}

@keyframes rdp-float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(120px, 80px) scale(1.1); }
    66%      { transform: translate(-60px, 140px) scale(0.95); }
}

@keyframes rdp-float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-100px, -120px) scale(1.15); }
}

@keyframes rdp-float-3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    33%      { transform: translate(-30%, -65%) scale(1.2); }
    66%      { transform: translate(-70%, -35%) scale(0.85); }
}

/* Faint dot/grid pattern */
.rdp-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.9) 0%, transparent 70%);
            mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.9) 0%, transparent 70%);
}

/* Vignette to darken the edges */
.rdp-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.6) 100%);
}

/* Subtle film grain */
.rdp-noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
    opacity: 0.05;
    mix-blend-mode: overlay;
}


/* ---------- Top bar ---------- */

.rdp-topbar {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
}

@media (max-width: 640px) {
    .rdp-topbar { padding: 20px 20px; }
}

.rdp-signout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    text-decoration: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.rdp-signout:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}


/* ---------- Hero section ---------- */

.rdp-hero {
    position: relative;
    z-index: 10;
    padding: 40px 24px 80px;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 100px);
}

@media (min-width: 768px) {
    .rdp-hero { padding: 60px 24px 100px; }
}

.rdp-intro {
    text-align: center;
    max-width: 640px;
    margin-bottom: 56px;
}

.rdp-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    margin-bottom: 24px;
    letter-spacing: 0.01em;
}

.rdp-pill-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    animation: rdp-pulse 2.4s ease-in-out infinite;
}

@keyframes rdp-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(1.3); }
}

.rdp-title {
    font-size: 44px;
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.05;
    color: #FFFFFF;
    margin: 0 0 18px;
    background: linear-gradient(180deg, #FFFFFF 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (min-width: 768px) {
    .rdp-title { font-size: 56px; }
}

.rdp-subtitle {
    font-size: 16px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
}

@media (min-width: 768px) {
    .rdp-subtitle { font-size: 17px; }
}


/* ---------- Cards ---------- */

.rdp-cards {
    width: 100%;
    max-width: 880px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .rdp-cards { grid-template-columns: 1fr 1fr; gap: 24px; }
}

.rdp-card {
    position: relative;
    display: block;
    padding: 36px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.4s ease,
                box-shadow 0.5s ease;
    isolation: isolate;
}

.rdp-card::before {
    /* Top edge highlight */
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 50%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.rdp-card-insurance {
    --rdp-accent:        #A78BFA;
    --rdp-accent-bg:     rgba(124, 58, 237, 0.16);
    --rdp-accent-border: rgba(167, 139, 250, 0.45);
    --rdp-accent-glow:   rgba(124, 58, 237, 0.35);
}

.rdp-card-leasing {
    --rdp-accent:        #FB923C;
    --rdp-accent-bg:     rgba(249, 115, 22, 0.16);
    --rdp-accent-border: rgba(251, 146, 60, 0.45);
    --rdp-accent-glow:   rgba(249, 115, 22, 0.3);
}

.rdp-card:hover {
    transform: translateY(-6px);
    border-color: var(--rdp-accent-border);
    box-shadow:
        0 30px 70px -20px rgba(0, 0, 0, 0.6),
        0 0 90px -10px var(--rdp-accent-glow);
}

/* Soft radial glow that appears on hover */
.rdp-card-glow {
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at 50% 0%, var(--rdp-accent-bg) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 0;
}

.rdp-card:hover .rdp-card-glow {
    opacity: 1;
}

/* Shimmer line that sweeps across on hover */
.rdp-card-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
    pointer-events: none;
    transition: left 0.8s ease;
    z-index: 0;
}

.rdp-card:hover .rdp-card-shimmer {
    left: 100%;
}

.rdp-card-inner {
    position: relative;
    z-index: 1;
}

.rdp-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--rdp-accent-bg);
    border: 1px solid var(--rdp-accent-border);
    color: var(--rdp-accent);
    margin-bottom: 28px;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.rdp-card:hover .rdp-card-icon {
    transform: scale(1.08) rotate(-4deg);
}

.rdp-card-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #FFFFFF;
    margin: 0 0 12px;
}

.rdp-card-desc {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 28px;
}

.rdp-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--rdp-accent);
    transition: gap 0.3s ease;
}

.rdp-card:hover .rdp-card-cta {
    gap: 14px;
}

.rdp-card-cta svg {
    transition: transform 0.3s ease;
}


/* ---------- Empty state ---------- */

.rdp-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 32px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.rdp-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #F59E0B;
    margin-bottom: 20px;
}

.rdp-empty-title {
    font-size: 22px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 8px;
}

.rdp-empty-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
}


/* ---------- Entry animations ---------- */

@keyframes rdp-fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes rdp-fade-down {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rdp-fade-up {
    animation: rdp-fade-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.rdp-fade-down {
    animation: rdp-fade-down 0.7s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}


/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    .rdp-orb,
    .rdp-pill-dot {
        animation: none !important;
    }
    .rdp-fade-up,
    .rdp-fade-down {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .rdp-card,
    .rdp-card-icon,
    .rdp-card-cta {
        transition: none !important;
    }
}
