/* ============================================================
   HyperCVMS — Frontend Voucher Request Form
   Aurora Neon Blue-Purple Glassmorphism Theme
   Matches HyperCVMS admin UI aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* ── Reset & Base ───────────────────────────────────────────── */
.cvms-req-page *,
.cvms-req-page *::before,
.cvms-req-page *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Page Wrapper ───────────────────────────────────────────── */
.cvms-req-page {
    position: relative;
    min-height: 100vh;
    width: 100%;
    background: #0b0f19;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px 80px 20px;
    overflow-x: hidden;
}

/* ── Aurora Background Blobs ────────────────────────────────── */
.cvms-req-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.cvms-req-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.12;
    animation: cvms-blob-drift 12s ease-in-out infinite alternate;
}
.cvms-req-blob--1 {
    width: 520px;
    height: 520px;
    background: #00f2fe;
    top: -160px;
    right: -100px;
    animation-delay: 0s;
    animation-duration: 14s;
}
.cvms-req-blob--2 {
    width: 420px;
    height: 420px;
    background: #9b51e0;
    bottom: -100px;
    left: -80px;
    animation-delay: 3s;
    animation-duration: 18s;
}
.cvms-req-blob--3 {
    width: 300px;
    height: 300px;
    background: #4f46e5;
    top: 40%;
    left: 50%;
    animation-delay: 6s;
    animation-duration: 16s;
}
@keyframes cvms-blob-drift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(30px, -20px) scale(1.05); }
    100% { transform: translate(-20px, 30px) scale(0.95); }
}
.cvms-req-blob--3 {
    transform: translateX(-50%) scale(1);
}

/* ── All content above background ──────────────────────────── */
.cvms-req-header,
.cvms-req-card,
.cvms-req-powered {
    position: relative;
    z-index: 1;
}

/* ── Header — Fix: compact, no large empty block ────────────── */
.cvms-req-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
    text-align: center;
}

/* ── Logo — Fix: reduced from 52px to 36px ──────────────────── */
/*.cvms-req-logo {
    width: 36px;
    height: 36px;
    margin-bottom: 2px;
}
.cvms-req-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
    display: block;
}
*/
/* ── Title — HYPER + CVMS aurora gradient ───────────────────── */
.cvms-req-title {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1;
    text-transform: uppercase;
    display: inline-flex;
    gap: 0;
}
.cvms-req-title--hyper {
    color: #ffffff;
}
.cvms-req-title--cvms {
    background: linear-gradient(90deg, #00f2fe, #4f46e5, #9b51e0, #00f2fe);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: cvms-aurora-shift 6s linear infinite;
}
@keyframes cvms-aurora-shift {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* ── Fix: Subtitle + tagline removed from display ───────────── */
.cvms-req-subtitle,
.cvms-req-tagline {
    display: none !important;
}

/* ── Form Card — Glassmorphism ──────────────────────────────── */
.cvms-req-card {
    width: 100%;
    max-width: 680px;
    background: rgba(20, 27, 45, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 40px 44px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow:
        0 0 0 1px rgba(0, 242, 254, 0.04),
        0 24px 64px rgba(0, 0, 0, 0.5);
}

/* ── Card Title ─────────────────────────────────────────────── */
.cvms-req-card-title {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cvms-req-card-icon {
    color: #00f2fe;
    font-size: 18px;
    line-height: 1;
}

/* ── Fix: Card description — now clearly white/visible ──────── */
.cvms-req-card-desc {
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 28px;
    line-height: 1.6;
    opacity: 0.85;
}
.cvms-req-required {
    color: #ef4444;
    font-weight: 700;
}

/* ── Section ────────────────────────────────────────────────── */
.cvms-req-section {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.cvms-req-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}
.cvms-req-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #00f2fe;
    margin-bottom: 16px;
}
.cvms-req-optional-tag {
    font-size: 10px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    border-radius: 20px;
    padding: 2px 8px;
    letter-spacing: 0.3px;
    text-transform: none;
}

/* ── Field Row — 2 columns ──────────────────────────────────── */
.cvms-req-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ── Field Group ────────────────────────────────────────────── */
.cvms-req-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ── Fix: Field labels — full white, visible ─────────────────── */
.cvms-req-field-group label {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.3px;
}

/* ── Fix: Field hints — readable muted color ─────────────────── */
.cvms-req-field-hint {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
}

/* ── Inputs ─────────────────────────────────────────────────── */
.cvms-req-page input[type="text"],
.cvms-req-page input[type="email"],
.cvms-req-page input[type="number"] {
    background: rgba(7, 9, 15, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #f1f5f9 !important;
    border-radius: 10px !important;
    padding: 11px 14px !important;
    font-size: 14px !important;
    font-family: 'Manrope', sans-serif !important;
    width: 100% !important;
    box-sizing: border-box !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
.cvms-req-page input[type="text"]:focus,
.cvms-req-page input[type="email"]:focus,
.cvms-req-page input[type="number"]:focus {
    border-color: #00f2fe !important;
    box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.12) !important;
}

/* ── Fix: Placeholder — slightly lighter, readable ───────────── */
.cvms-req-page input::placeholder {
    color: #475569 !important;
    font-size: 13px !important;
}

/* ── Input error state ──────────────────────────────────────── */
.cvms-req-page input.cvms-field-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

/* ── Preset Buttons ─────────────────────────────────────────── */
.cvms-req-preset-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.cvms-req-preset-btn {
    background: rgba(37, 99, 235, 0.15) !important;
    border: 1.5px solid rgba(37, 99, 235, 0.4) !important;
    color: #93c5fd !important;
    padding: 9px 20px !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    font-family: 'Manrope', sans-serif !important;
    transition: all 0.2s ease !important;
    animation: none !important;
    box-shadow: none !important;
    letter-spacing: 0.2px;
}
.cvms-req-preset-btn:hover {
    background: rgba(37, 99, 235, 0.3) !important;
    border-color: rgba(37, 99, 235, 0.7) !important;
    color: #ffffff !important;
}
.cvms-req-preset-btn.active {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}
.cvms-req-preset-btn--custom {
    background: rgba(67, 56, 202, 0.15) !important;
    border-color: rgba(67, 56, 202, 0.4) !important;
    color: #a5b4fc !important;
}
.cvms-req-preset-btn--custom:hover {
    background: rgba(67, 56, 202, 0.3) !important;
    border-color: rgba(67, 56, 202, 0.7) !important;
    color: #ffffff !important;
}
.cvms-req-preset-btn--custom.active {
    background: #4338ca !important;
    border-color: #4338ca !important;
    color: #ffffff !important;
}

/* ── Custom amount input wrap ───────────────────────────────── */
.cvms-req-custom-wrap {
    margin-top: 12px;
}

/* ── Min Cart Preview ───────────────────────────────────────── */
.cvms-req-mincart-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(0, 242, 254, 0.05);
    border: 1px solid rgba(0, 242, 254, 0.15);
    border-radius: 8px;
}
.cvms-req-mincart-label {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}
.cvms-req-mincart-value {
    font-size: 13px;
    font-weight: 800;
    color: #00f2fe;
    letter-spacing: 0.3px;
}

/* ── Notice ─────────────────────────────────────────────────── */
.cvms-req-notice {
    padding: 13px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid;
    margin-bottom: 16px;
    line-height: 1.5;
}
.cvms-req-notice.success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}
.cvms-req-notice.error {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* ── Submit Button — Aurora gradient ────────────────────────── */
.cvms-req-submit-btn {
    width: 100% !important;
    padding: 15px 28px !important;
    border: none !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    font-family: 'Manrope', sans-serif !important;
    letter-spacing: 0.4px !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #00f2fe 0%, #4f46e5 50%, #9b51e0 100%) !important;
    background-size: 200% 200% !important;
    animation: cvms-btn-aurora 6s ease infinite !important;
    transition: opacity 0.2s ease, transform 0.2s ease !important;
    box-shadow: 0 4px 24px rgba(0, 242, 254, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    margin-top: 8px !important;
}
@keyframes cvms-btn-aurora {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.cvms-req-submit-btn:hover {
    opacity: 0.9 !important;
    transform: translateY(-1px) !important;
}
.cvms-req-submit-btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* ── Submit spinner ─────────────────────────────────────────── */
.cvms-req-submit-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    display: inline-block;
    animation: cvms-spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes cvms-spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ── Fix: Footer note — readable muted color ─────────────────── */
.cvms-req-footer-note {
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    margin-top: 14px;
    line-height: 1.6;
}

/* ── Success State ──────────────────────────────────────────── */
.cvms-req-success-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 12px 0;
}
.cvms-req-success-icon {
    color: #10b981;
    animation: cvms-success-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes cvms-success-pop {
    0%   { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.cvms-req-success-title {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

/* ── Fix: Success message — visible color ───────────────────── */
.cvms-req-success-msg {
    font-size: 14px;
    color: #cbd5e1;
    max-width: 420px;
    line-height: 1.6;
}

/* ── Success details box ────────────────────────────────────── */
.cvms-req-success-details {
    width: 100%;
    max-width: 400px;
    background: rgba(7, 9, 15, 0.6);
    border: 1px solid rgba(0, 242, 254, 0.15);
    border-radius: 12px;
    padding: 20px 24px;
    text-align: left;
}
.cvms-req-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 13px;
}
.cvms-req-detail-row:last-child {
    border-bottom: none;
}
.cvms-req-detail-label {
    color: #94a3b8;
    font-weight: 600;
}
.cvms-req-detail-value {
    color: #e2e8f0;
    font-weight: 700;
    text-align: right;
}
.cvms-req-detail-value--highlight {
    color: #00f2fe;
    font-family: monospace;
    font-size: 14px;
}
.cvms-req-detail-value--approved {
    color: #10b981;
}
.cvms-req-detail-value--pending {
    color: #f59e0b;
}

/* ── Fix: Success email note — readable muted color ─────────── */
.cvms-req-success-email-note {
    font-size: 12px;
    color: #94a3b8;
    max-width: 380px;
    line-height: 1.6;
}

/* ── New Request Button ─────────────────────────────────────── */
.cvms-req-new-btn {
    background: transparent !important;
    border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
    color: #94a3b8 !important;
    padding: 10px 24px !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    font-family: 'Manrope', sans-serif !important;
    transition: all 0.2s ease !important;
    margin-top: 4px !important;
}
.cvms-req-new-btn:hover {
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

/* ── Powered by footer ──────────────────────────────────────── */
.cvms-req-powered {
    margin-top: 32px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.3px;
}
.cvms-req-powered strong {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
}

/* ── Responsive — Mobile ────────────────────────────────────── */
@media (max-width: 680px) {
    .cvms-req-page {
        padding: 32px 16px 60px 16px;
    }
    .cvms-req-card {
        padding: 28px 22px;
        border-radius: 16px;
    }
    .cvms-req-title {
        font-size: 28px;
    }
    .cvms-req-field-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .cvms-req-preset-group {
        gap: 8px;
    }
    .cvms-req-preset-btn {
        padding: 8px 14px !important;
        font-size: 12px !important;
    }
    .cvms-req-success-details {
        padding: 16px 18px;
    }
}

@media (max-width: 400px) {
    .cvms-req-title {
        font-size: 24px;
    }
    .cvms-req-card {
        padding: 22px 16px;
    }
}

/* ── Theme override — ensure dark bg fills page ─────────────── */
body:has(.cvms-req-page) {
    background: #0b0f19 !important;
}
.cvms-req-page + * {
    display: none;
}
body:has(.cvms-req-page) .site-header,
body:has(.cvms-req-page) .entry-header,
body:has(.cvms-req-page) .breadcrumb,
body:has(.cvms-req-page) .woocommerce-breadcrumb,
body:has(.cvms-req-page) aside,
body:has(.cvms-req-page) .sidebar,
body:has(.cvms-req-page) .widget-area {
    display: none !important;
}