/* ==========================================================================
   CFV Pedidos Especiales (Por Encargo) - optional LIGHT theme.

   Linked LAST in _Layout.cshtml (after encargo-redesign.css and the CDNs).
   Every themed rule is scoped under html[data-theme="light"], so the default
   dark theme renders exactly as before. The only unscoped rules target the
   new .theme-toggle button.

   In light, --enc-neon becomes deep teal (it is used mostly for TEXT, icons
   and borders). The places that use it as a FILL (neon buttons, active step,
   badges, floating cart) are restored to the brand cyan with dark text.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Theme toggle (both themes; new element only)
   -------------------------------------------------------------------------- */
header .navbar .theme-toggle {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    /* encargo-redesign.css has a global `button { width: 100% }` */
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--enc-line, rgba(35, 224, 247, 0.14));
    border-radius: var(--enc-radius-sm, 10px);
    background: transparent;
    color: var(--enc-text, #e9f6fa);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

header .navbar .theme-toggle:hover {
    color: var(--enc-neon, #23e0f7);
    border-color: var(--enc-neon-dim, #0fb6d4);
}

header .navbar .theme-toggle:focus-visible {
    outline: 2px solid var(--enc-neon, #23e0f7);
    outline-offset: 2px;
}

header .navbar .theme-toggle__icon {
    grid-area: 1 / 1;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* The visible icon is the mode the button switches TO:
   sun while dark (go light), moon while light (go dark). */
header .navbar .theme-toggle__moon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.6);
}

html[data-theme="light"] header .navbar .theme-toggle__sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.6);
}

html[data-theme="light"] header .navbar .theme-toggle__moon {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    header .navbar .theme-toggle,
    header .navbar .theme-toggle__icon {
        transition: none;
    }
}

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
html[data-theme="light"] {
    color-scheme: light;
    --enc-bg: #f5f7f8;
    --enc-bg-alt: #eef2f4;
    --enc-surface: #ffffff;
    --enc-surface-2: #f3f6f7;
    --enc-surface-3: #ffffff;
    --enc-line: rgba(0, 142, 144, 0.24);
    --enc-line-soft: rgba(15, 26, 31, 0.10);
    --enc-neon: #007a7c;          /* text/icons: 5.2:1 on white */
    --enc-neon-dim: #008e90;      /* borders, focus */
    --enc-neon-deep: #0a7f97;
    --enc-text: #0f1a1f;
    --enc-text-muted: #4c5c63;
    --enc-text-faint: #5b6a71;
    --enc-danger: #c9264a;
    --enc-glow: 0 0 0 1px rgba(0, 142, 144, 0.25), 0 0 18px -6px rgba(0, 142, 144, 0.35);
    /* Light-only helpers */
    --enc-fill: #23e0f7;
    --enc-fill-2: #5ceefd;
    --enc-on-fill: #02171c;
    --enc-label: #2f3d44;
    --enc-input-line: rgba(15, 26, 31, 0.2);
    --enc-input-line-hover: rgba(15, 26, 31, 0.34);
    --enc-ok-text: #146c3a;
    --enc-error-text: #a61b36;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
html[data-theme="light"] body {
    background-image: radial-gradient(1200px 600px at 50% -10%, rgba(0, 142, 144, 0.07), transparent 70%);
}

html[data-theme="light"] ::selection {
    background: rgba(0, 142, 144, 0.22);
    color: var(--enc-text);
}

/* --------------------------------------------------------------------------
   3. Navbar (beats `background: rgba(4,7,10,.92) !important`, bg-dark and
   the inline style="background-color:black")
   -------------------------------------------------------------------------- */
html[data-theme="light"] header .navbar {
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 1px 10px rgba(15, 26, 31, 0.06);
    --bs-navbar-color: var(--enc-text);
    --bs-navbar-hover-color: var(--enc-neon);
    --bs-navbar-active-color: var(--enc-text);
    --bs-navbar-brand-color: var(--enc-text);
    --bs-navbar-brand-hover-color: var(--enc-text);
    --bs-navbar-toggler-border-color: var(--enc-input-line);
    --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%230f1a1f' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

html[data-theme="light"] header .navbar-toggler {
    border-color: var(--enc-input-line);
}

/* Logo is #00FFFF on transparent: darken it so it reads on white (~#008C8C) */
html[data-theme="light"] header .navbar-brand img,
html[data-theme="light"] header .navbar-brand:hover img {
    filter: brightness(0.55);
}

/* nav-link carries .text-light; encargo-redesign already forces --enc-text */
html[data-theme="light"] header .navbar .nav-link.text-light {
    color: var(--enc-text) !important;
}

html[data-theme="light"] header .navbar .nav-link.text-light:hover {
    color: var(--enc-neon) !important;
}

html[data-theme="light"] header .navbar .nav-link::after {
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   4. Hero (stadium / neon art is dark-only: hidden, clean light backdrop)
   -------------------------------------------------------------------------- */
html[data-theme="light"] .enc-hero {
    background:
        radial-gradient(900px 420px at 85% 20%, rgba(0, 142, 144, 0.10), transparent 70%),
        linear-gradient(180deg, #ffffff 0%, #eef3f5 100%);
}

html[data-theme="light"] .enc-hero__bg,
html[data-theme="light"] .enc-hero__lights,
html[data-theme="light"] .enc-hero__stripes,
html[data-theme="light"] .enc-hero__dots,
html[data-theme="light"] .enc-hero__splash {
    display: none;
}

html[data-theme="light"] .enc-hero__eyebrow,
html[data-theme="light"] .enc-hero__title em {
    text-shadow: none;
}

html[data-theme="light"] .enc-hero__title,
html[data-theme="light"] .enc-hero__trust li,
html[data-theme="light"] .enc-hero__trust strong {
    color: var(--enc-text);
}

html[data-theme="light"] .enc-hero__lead {
    color: #3e4c53;
}

html[data-theme="light"] .enc-hero__trust i {
    background: #ffffff;
    box-shadow: 0 4px 14px -8px rgba(15, 26, 31, 0.25);
}

html[data-theme="light"] .enc-hero__jersey {
    filter: drop-shadow(0 18px 30px rgba(15, 26, 31, 0.25));
}

html[data-theme="light"] .enc-hero__claim {
    color: var(--enc-text);
    text-shadow: none;
}

html[data-theme="light"] .enc-hero__claim::after {
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   5. Stepper
   -------------------------------------------------------------------------- */
html[data-theme="light"] .enc-steps li.is-active .enc-steps__num {
    color: var(--enc-on-fill);
    background: var(--enc-fill);
    border-color: var(--enc-neon-dim);
    box-shadow: 0 4px 14px -6px rgba(0, 142, 144, 0.6);
}

/* --------------------------------------------------------------------------
   6. Cards
   -------------------------------------------------------------------------- */
html[data-theme="light"] .enc-card {
    background: #ffffff;
    box-shadow: 0 14px 34px -24px rgba(15, 26, 31, 0.35);
}

html[data-theme="light"] .enc-card::before {
    background: linear-gradient(90deg, transparent, rgba(0, 142, 144, 0.45), transparent);
}

html[data-theme="light"] .enc-card__title {
    color: var(--enc-text);
}

/* --------------------------------------------------------------------------
   7. Forms (main page and modals)
   -------------------------------------------------------------------------- */
html[data-theme="light"] .enc-main label,
html[data-theme="light"] .enc-main .control-label,
html[data-theme="light"] .enc-main .form-label,
html[data-theme="light"] .enc-co__campo label {
    color: var(--enc-label);
}

html[data-theme="light"] .enc-main .form-control,
html[data-theme="light"] .enc-main select.form-control,
html[data-theme="light"] .enc-main textarea.form-control,
html[data-theme="light"] .enc-modal .form-control,
html[data-theme="light"] .enc-modal select.form-control,
html[data-theme="light"] .enc-modal textarea.form-control {
    border-color: var(--enc-input-line);
}

html[data-theme="light"] .enc-main .form-control:hover {
    border-color: var(--enc-input-line-hover);
}

html[data-theme="light"] .enc-main .form-control:focus,
html[data-theme="light"] .enc-main select.form-control:focus,
html[data-theme="light"] .enc-modal .form-control:focus {
    background-color: #ffffff;
    border-color: var(--enc-neon-dim);
    box-shadow: 0 0 0 3px rgba(0, 142, 144, 0.16);
}

html[data-theme="light"] .enc-main select.form-control option,
html[data-theme="light"] .enc-modal select.form-control option {
    background: #ffffff;
    color: var(--enc-text);
}

html[data-theme="light"] .enc-modal .form-control:disabled,
html[data-theme="light"] .enc-modal .form-control[disabled] {
    background-color: #eef2f4;
    color: var(--enc-text-faint);
}

/* encargo-redesign.css forces the dark spinner on number inputs */
html[data-theme="light"] .enc-main input[type="number"],
html[data-theme="light"] input[type="number"] {
    color-scheme: light;
}

html[data-theme="light"] .enc-main input[type="file"].form-control::file-selector-button,
html[data-theme="light"] .enc-modal input[type="file"].form-control::file-selector-button {
    background: rgba(0, 142, 144, 0.08);
}

/* --------------------------------------------------------------------------
   8. Buttons
   -------------------------------------------------------------------------- */
html[data-theme="light"] .enc-btn--neon,
html[data-theme="light"] .enc-btn--neon:hover {
    color: var(--enc-on-fill);
    background: linear-gradient(100deg, var(--enc-fill), var(--enc-fill-2) 55%, var(--enc-fill));
    box-shadow: 0 10px 22px -12px rgba(0, 142, 144, 0.7);
}

html[data-theme="light"] .enc-btn:hover {
    background: rgba(0, 142, 144, 0.07);
}

html[data-theme="light"] .enc-btn--neon:hover {
    filter: brightness(1.04);
}

html[data-theme="light"] .enc-btn--danger:hover {
    background: rgba(201, 38, 74, 0.07);
}

/* --------------------------------------------------------------------------
   9. Image drop zone and thumbnails
   -------------------------------------------------------------------------- */
html[data-theme="light"] .enc-main #drop-area {
    border-color: rgba(0, 142, 144, 0.45) !important;
    background: rgba(0, 142, 144, 0.03);
}

html[data-theme="light"] .enc-main #drop-area:hover,
html[data-theme="light"] .enc-main #drop-area.active {
    border-color: var(--enc-neon-dim) !important;
    background: rgba(0, 142, 144, 0.07);
}

html[data-theme="light"] .enc-main #drop-area.active {
    box-shadow: inset 0 0 30px rgba(0, 142, 144, 0.10);
}

html[data-theme="light"] .enc-drop__icon {
    text-shadow: none;
}

html[data-theme="light"] .enc-main #image-preview img {
    box-shadow: 0 6px 14px -10px rgba(15, 26, 31, 0.5);
}

html[data-theme="light"] .enc-thumb__x {
    border-color: #ffffff;
}

/* --------------------------------------------------------------------------
   10. Crest picker (#LeagueLogo)
   -------------------------------------------------------------------------- */
html[data-theme="light"] .enc-main .selected-option {
    border-color: var(--enc-input-line);
}

html[data-theme="light"] .enc-main .selected-option:hover {
    box-shadow: 0 0 0 3px rgba(0, 142, 144, 0.12);
}

html[data-theme="light"] .enc-main .selected-option img,
html[data-theme="light"] .enc-main .options-list .option img,
html[data-theme="light"] .enc-preview__escudo {
    background: #f4f4f5;
}

html[data-theme="light"] .enc-main .options-list {
    background-color: #ffffff;
    box-shadow: 0 20px 40px -18px rgba(15, 26, 31, 0.35);
}

html[data-theme="light"] .enc-main .options-list .option:hover {
    background-color: rgba(0, 142, 144, 0.08);
}

/* --------------------------------------------------------------------------
   11. Item preview
   -------------------------------------------------------------------------- */
html[data-theme="light"] .enc-preview__figure {
    background: radial-gradient(circle at 50% 30%, rgba(0, 142, 144, 0.08), transparent 65%), #f4f4f5;
}

html[data-theme="light"] .enc-preview__badge {
    color: var(--enc-on-fill);
    background: var(--enc-fill);
}

html[data-theme="light"] .enc-preview__name,
html[data-theme="light"] .enc-preview__list li,
html[data-theme="light"] .enc-preview__list li b {
    color: var(--enc-text);
}

html[data-theme="light"] .enc-preview__total {
    background: rgba(0, 142, 144, 0.06);
}

html[data-theme="light"] .enc-preview__total strong {
    text-shadow: none;
}

/* --------------------------------------------------------------------------
   12. Added items table (thead carries .text-white in the markup)
   -------------------------------------------------------------------------- */
html[data-theme="light"] .enc-added .table {
    --bs-table-striped-bg: rgba(15, 26, 31, 0.025);
}

html[data-theme="light"] .enc-added .table > thead th,
html[data-theme="light"] .enc-added .table > thead th.text-white {
    color: var(--enc-text-muted) !important;
}

html[data-theme="light"] .enc-added .table > tbody > tr:hover > td {
    background: rgba(0, 142, 144, 0.05);
}

html[data-theme="light"] .enc-empty i {
    color: #9aa8ae;
}

/* --------------------------------------------------------------------------
   13. Floating cart button
   -------------------------------------------------------------------------- */
html[data-theme="light"] .floating-button {
    background: linear-gradient(140deg, var(--enc-fill), #0fb6d4) !important;
    color: var(--enc-on-fill) !important;
    box-shadow: 0 12px 26px -10px rgba(0, 142, 144, 0.6) !important;
}

html[data-theme="light"] .floating-button:hover {
    background: linear-gradient(140deg, var(--enc-fill-2), var(--enc-fill)) !important;
}

/* --------------------------------------------------------------------------
   14. Modals
   -------------------------------------------------------------------------- */
html[data-theme="light"] .enc-modal .modal-content {
    background: #ffffff;
    box-shadow: 0 30px 70px -30px rgba(15, 26, 31, 0.45);
}

html[data-theme="light"] .enc-modal .modal-title {
    color: var(--enc-text);
}

/* Bootstrap's close icon is already dark: do not invert it on light */
html[data-theme="light"] .enc-modal .btn-close {
    filter: none;
}

html[data-theme="light"] .enc-modal .btn-primary,
html[data-theme="light"] .enc-modal .btn-success {
    color: var(--enc-on-fill);
    background: linear-gradient(100deg, var(--enc-fill), var(--enc-fill-2));
    box-shadow: 0 8px 20px -12px rgba(0, 142, 144, 0.7);
}

html[data-theme="light"] .enc-modal .btn-primary:hover,
html[data-theme="light"] .enc-modal .btn-success:hover {
    color: var(--enc-on-fill);
}

html[data-theme="light"] .enc-modal .btn-outline-primary {
    background: rgba(0, 142, 144, 0.05);
}

html[data-theme="light"] .enc-modal .btn-outline-primary:hover {
    color: var(--enc-on-fill);
    background: var(--enc-fill);
    border-color: var(--enc-neon-dim);
}

html[data-theme="light"] .enc-modal .btn-danger {
    background: rgba(201, 38, 74, 0.08);
    border-color: rgba(201, 38, 74, 0.4);
}

/* --------------------------------------------------------------------------
   15. Quick checkout (#enc-co-modal)
   -------------------------------------------------------------------------- */
html[data-theme="light"] .enc-co__n {
    color: var(--enc-on-fill);
    background: var(--enc-fill);
}

html[data-theme="light"] .enc-co__item,
html[data-theme="light"] .enc-co__opcion {
    background: rgba(15, 26, 31, 0.02);
}

html[data-theme="light"] .enc-co__item-texto strong,
html[data-theme="light"] .enc-co__datos-texto strong,
html[data-theme="light"] .enc-co__opcion-nombre,
html[data-theme="light"] .enc-co__linea--total,
html[data-theme="light"] .enc-co__linea--total b {
    color: var(--enc-text);
}

html[data-theme="light"] .enc-co__datos,
html[data-theme="light"] .enc-co__totales {
    background: rgba(0, 142, 144, 0.04);
}

html[data-theme="light"] .enc-co__aviso {
    border-color: rgba(0, 142, 144, 0.4);
    background: rgba(0, 142, 144, 0.03);
}

html[data-theme="light"] .enc-co__opcion:has(input:checked) {
    background: rgba(0, 142, 144, 0.07);
    box-shadow: inset 0 0 18px rgba(0, 142, 144, 0.06);
}

html[data-theme="light"] .enc-co__linea--abono b {
    text-shadow: none;
}

html[data-theme="light"] .enc-co__buscar-msg,
html[data-theme="light"] .enc-co__error {
    color: var(--enc-error-text);
}

html[data-theme="light"] .enc-co__error {
    background: rgba(201, 38, 74, 0.08);
}

html[data-theme="light"] .enc-co__buscar-msg.es-ok,
html[data-theme="light"] .enc-busca__msg--ok {
    color: var(--enc-ok-text);
}

html[data-theme="light"] .enc-co__wa {
    color: var(--enc-ok-text);
    background: rgba(37, 211, 102, 0.10);
}

html[data-theme="light"] .enc-co__wa:hover:not(:disabled) {
    color: #0f5c30;
    background: rgba(37, 211, 102, 0.20);
}

html[data-theme="light"] .enc-co__wa i {
    color: #1a9e53;
}

/* --------------------------------------------------------------------------
   16. Footer (container carries .text-white in the markup)
   -------------------------------------------------------------------------- */
html[data-theme="light"] footer.footer .text-white {
    color: var(--enc-text) !important;
}
