﻿/* ---------- Notas (tarjeta) ---------- */
:root {
    --aj-brand: #199EB8; /* turquesa */
    --aj-accent: #E04F00; /* teja/naranja */
    --aj-ink: #222;
    --aj-muted: #6c757d;
    --aj-note-bg: #FFF8F3; /* fondo suave */
    --aj-note-bd: #FFD7C2; /* borde suave */
}

.quotation_body {
    background: #f7f9fb; /* gris azulado muy suave */
}

section#cotizador {
    background: #f7f9fb;
    border-top: 1px solid #e0e4e8;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.col-md-3.address-section {
    margin: 5px 0px;
}

.col-md-6.address-section {
    margin: 5px 0px;
}

.col-md-9.address-section {
    margin: 5px 0px;
}

.table tfoot th {
    font-weight: 600;
}

/* Quote look & feel pegado a la landing */
#cotizador .section-title {
    color: #199EB8;
    font-weight: 800;
    margin-bottom: 14px;
}

.quote-card {
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(0,0,0,.06);
}

    .quote-card .form-control {
        border-radius: 12px;
        padding: .8rem 1rem;
    }

    .quote-card .form-select {
        border-radius: 12px;
        padding: .8rem 1rem;
        max-width:250px;
    }

/* Tabla con acento de marca */
.quote-table thead th {
    border-bottom: 2px solid #199EB8;
}

.quote-table tfoot th {
    font-weight: 700;
}

.quote-table tfoot tr:last-child th {
    border-top: 2px solid #E04F00;
    font-size: 1.05rem;
}

/* Resumen sticky */
.quote-summary {
    position: sticky;
    top: 85px;
}

    .quote-summary .summary-inner {
        background: #fff;
        border: 1px solid rgba(0,0,0,.06);
        border-radius: 16px;
        padding: 20px;
        box-shadow: 0 8px 18px rgba(0,0,0,.08);
    }

    .quote-summary .mini-totals > div {
        padding: 6px 0;
    }

/* Botones usan .btn del tema base (#199EB8) */
#cotizador .btn-ghost {
    border-color: #199EB8;
    color: #199EB8;
}

    #cotizador .btn-ghost:hover {
        background: #199EB8;
        color: #fff;
    }

/* Autocomplete visual */
#autocomplete {
    background: #fff url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23199EB8\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 10c0 7-9 12-9 12S3 17 3 10a9 9 0 1 1 18 0Z\"/><circle cx=\"12\" cy=\"10\" r=\"3\"/></svg>') no-repeat right .9rem center/18px;
    padding-right: 2.4rem;
}

.brand-logo{
    max-width:240px;
    margin: 0 auto;
}

.bi.bi-trash {
    transition: transform 0.2s ease;
}

    .bi.bi-trash:hover {
        transform: scale(1.2);
    }

/* Oculta el checkbox nativo */
.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

/* Estilo visual del switch */
.toggle-slider {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    background-color: #ccc;
    border-radius: 34px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    /* Circulito del switch */
    .toggle-slider::after {
        content: '';
        position: absolute;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background-color: white;
        top: 3px;
        left: 3px;
        transition: transform 0.3s ease;
    }

/* Cuando el checkbox está activo */
.toggle-input:checked + .toggle-slider {
    background-color: #199EB8;
}

    .toggle-input:checked + .toggle-slider::after {
        transform: translateX(22px);
    }

#observations-container {
    background-color: black;
    
    align-items: center;
    justify-content: center;
    padding: 22px;
    border-radius: 16px;
    backdrop-filter: blur(8px) saturate(130%); /* clave para ver “lo de atrás” */
    background: rgba(255,255,255,.22); /* glass */
    border: 2px solid rgba(255,255,255,.6);
    box-shadow: 0 10px 30px rgba(0,0,0,.87);
}

.observations-title {
    color: #E04F00;
    font-weight: 700;
    font-size:1.1rem;
}

.observations {
    color: #E04F00;
    font-weight: 700;
    font-size: 0.6rem;
}

.note-card {
    position: relative;
    background: var(--aj-note-bg);
    border: 1px solid var(--aj-note-bd);
    border-radius: 16px;
    padding: 16px 16px 14px 16px;
    box-shadow: 0 8px 18px rgba(224,79,0,.12);
    overflow: hidden;
}

    /* pestañas decorativas en las esquinas */
    .note-card::before,
    .note-card::after {
        content: "";
        position: absolute;
        width: 12px;
        height: 12px;
        background: var(--aj-accent);
        opacity: .9;
    }

    .note-card::before {
        top: 10px;
        left: 10px;
        border-radius: 4px 0 4px 0;
    }

    .note-card::after {
        bottom: 10px;
        right: 10px;
        border-radius: 0 4px 0 4px;
    }

.note-card__header {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .5rem;
}

.note-card__badge {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    background: var(--aj-accent);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(224,79,0,.25);
}

.note-card__title {
    color: var(--aj-accent);
    font-weight: 800;
    letter-spacing: .2px;
}

.note-card__subtitle {
    color: var(--aj-muted);
}

/* lista con viñetas personalizadas */
.note-card__list {
    margin: .25rem 0 0 0;
    padding-left: 0;
    list-style: none;
}

    .note-card__list li {
        position: relative;
        padding-left: 22px;
        line-height: 1.4;
        color: var(--aj-ink); /* texto principal oscuro */
        margin: .5rem 0;
    }

        .note-card__list li .note-muted {
            color: var(--aj-muted); /* gris apagado para aclaraciones */
            font-style: italic;
        }

        .note-card__list li::before {
            content: "";
            position: absolute;
            left: 0;
            top: .45em;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: radial-gradient(circle at 35% 35%, #fff 0 2px, var(--aj-accent) 3px 100%);
            box-shadow: 0 0 0 2px rgba(224,79,0,.15);
        }

.note-muted {
    color: var(--aj-muted);
}

.note-min-size
{
    font-size:0.7rem;
}

/* integra con el panel de resumen */
.summary-inner .note-card {
    margin-top: 12px;
}

/* la sticky de la derecha no debe tapar nada de la izquierda */
.quote-summary {
    position: sticky;
    top: 24px;
    z-index: 1;
}

/* todo lo editable de la izquierda por encima de la sticky */
#clientInformation,
#invoiceInformation,
.pickmap-wrap {
    position: relative;
    z-index: 10;
}

.pickmap-wrap {
    margin-top: .75rem;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 10px;
    overflow: visible;
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
    position: relative;
    z-index: 10;
}

.pickmap {
    height: 320px;
}

.text-monospace {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}


/* Muestra el bloque cuando el checkbox esté marcado */
#needInvoice:checked ~ #invoiceInformation {
    display: block !important;
}

.autocomplete-list {
    position: relative;
}

    .autocomplete-list .ac-menu {
        position: absolute;
        z-index: 9999;
        top: 4px;
        left: 0;
        right: 0;
        background: #fff;
        border: 1px solid rgba(0,0,0,.1);
        border-radius: 8px;
        box-shadow: 0 6px 18px rgba(0,0,0,.08);
        max-height: 260px;
        overflow-y: auto;
    }

.ac-item {
    padding: 10px 12px;
    cursor: pointer;
    font-size: .95rem;
    line-height: 1.25rem;
}

    .ac-item:hover, .ac-item.is-active {
        background: #f6f7fb;
    }

.ac-muted {
    display: block;
    color: #6b7280;
    font-size: .85rem;
    margin-top: 2px;
}

.pickmap-wrap {
    margin-top: .75rem;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.pickmap {
    height: 320px;
}

.pickmap-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8fafc;
    border-top: 1px solid rgba(0,0,0,.06);
}

.text-monospace {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Si no son hermanos, usa un “flag” en el <form> */
#quoteForm.show-invoice #invoiceInformation {
    display: block !important;
}

/* Paleta base (ajústala a tu marca) */
:root {
  --aj-primary: #0ea5b7;   /* título/separadores */
  --aj-ring:    rgba(14,165,183,.18);
  --aj-border:  #e6eef5;
  --aj-text:    #334155;
  --aj-muted:   #64748b;
  --aj-bg:      #f8fafc;
}

/* Contenedor de facturación */
#invoiceInformation {
  position: relative;
  z-index: 10;
  background: linear-gradient(180deg,#fff 0%, var(--aj-bg) 100%);
  border: 1px solid var(--aj-border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(18,38,63,.06);
}

/* Tarjeta interna */
#invoiceInformation .quote-card {
  border: 0;
  background: transparent;
  box-shadow: none;
  margin: 0;
}

/* Encabezado */
#invoiceInformation .section-title {
  color: var(--aj-primary);
  font-weight: 800;
  letter-spacing: .2px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: .5rem;
}
#invoiceInformation .section-title::after {
  content:"";
  flex: 1 1 auto;
  height: 2px;
  background: linear-gradient(90deg,var(--aj-primary), transparent);
  opacity: .25;
  border-radius: 2px;
}

/* Etiquetas y ayudas */
#invoiceInformation .form-label {
  color: var(--aj-text);
  font-weight: 600;
  margin-bottom: .35rem;
}
#invoiceInformation .form-hint {
  font-size: .85rem;
  color: var(--aj-muted);
  margin-top: .25rem;
}

/* Inputs/Selects uniformes y modernos */
#invoiceInformation .form-control,
#invoiceInformation .form-select {
  border-radius: 12px;
  border-color: var(--aj-border);
  padding: .6rem .9rem;
  height: calc(2.6rem + 2px);
}
#invoiceInformation .form-control:focus,
#invoiceInformation .form-select:focus {
  border-color: var(--aj-primary);
  box-shadow: 0 0 0 .2rem var(--aj-ring);
  outline: none;
}

/* Layout: columnas parejas y buen flujo en móvil */
#invoiceInformation .row.g-3 > [class*="col-"] {
  display: grid;
}
@media (max-width: 768px) {
  #invoiceInformation { padding: 14px; border-radius: 14px; }
}

/* Pequeños badges para campos clave (opcional) */
.badge-soft {
  display: inline-block;
  padding: .2rem .5rem;
  border-radius: 999px;
  background: rgba(14,165,183,.1);
  color: var(--aj-primary);
  font-size: .75rem;
  font-weight: 700;
}

/* Quita el highlight amarillo temporal si aún existe */
#invoiceInformation { background-blend-mode: normal; }


/* Modo oscuro */
@media (prefers-color-scheme: dark) {
    .note-card {
        background: #2b1d18;
        border-color: #3b241c;
        box-shadow: 0 8px 18px rgba(0,0,0,.25);
    }

    .note-card__subtitle {
        color: #bfbfbf;
    }

    .note-muted {
        color: #bfbfbf;
    }
}

/* responsive */
@media (max-width: 991.98px) {
    .quote-summary {
        position: static;
    }

    .quote-card .form-select {
        border-radius: 12px;
        padding: .8rem 1rem;
        max-width: 290px;
    }
}

/* Variante para tarjeta de notas con fondo oscuro */
.note-card--inverse {
    background: #2b1d18;
    border-color: #3b241c;
    box-shadow: 0 8px 18px rgba(0,0,0,.25);
}

    /* Asegura color principal en los <li> (vence estilos heredados) */
    .note-card--inverse .note-card__list li {
        color: #ECECEC !important; /* texto principal claro */
    }

        /* Aclaraciones/paréntesis en gris tenue */
        .note-card--inverse .note-card__list li .note-muted {
            color: #BFBFBF !important;
            font-style: italic;
        }

/* Si el tema intenta atenuar todo dentro del resumen, vence eso también */
.summary-inner .note-card .note-card__list li {
    color: var(--aj-ink) !important;
}

.summary-inner .note-card--inverse .note-card__list li {
    color: #ECECEC !important;
}

    .summary-inner .note-card--inverse .note-card__list li .note-muted {
        color: #BFBFBF !important;
    }

/* Enfasis positivo */
.note-card__list li.note-good {
    color: #198754; /* verde tipo Bootstrap success */
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .4rem;
}

    .note-card__list li.note-good .note-good-icon {
        font-size: 1.1rem;
        line-height: 1;
    }

        .note-card__list li.note-good .note-good-icon svg {
            stroke: #198754; /* verde tipo success */
        }

.note-card__list li.note-good {
    color: #198754; /* texto verde */
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .4rem;
}

    .note-card__list li.note-good .note-good-icon {
        display: inline-flex;
        align-items: center;
    }

        .note-card__list li.note-good .note-good-icon svg {
            width: 18px;
            height: 18px;
        }

.days-row {
    display: flex;
    flex-wrap: wrap;
    column-gap: 12px; /* espacio horizontal entre chips */
    row-gap: 4px; /* espacio vertical al envolver */
    padding: 8px 12px;
}

.days-chip {
    display: inline-flex;
    align-items: baseline;
}

.days-val {
    margin-left: .25rem;
}
/* espacio tras los dos puntos */
.days-note {
    flex-basis: 100%;
}
/* la nota va a nueva línea */

/* ===== Botones solo dentro del cotizador ===== */
#cotizador .btn {
    border-radius: .5rem;
    box-shadow: none;
}

/* Primario (Bootstrap default) */
#cotizador .btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

    #cotizador .btn-primary:hover {
        background-color: #0b5ed7;
        border-color: #0a58ca;
    }

/* Light (Bootstrap default) */
#cotizador .btn-light {
    background-color: #f8f9fa;
    border-color: #f8f9fa;
    color: #212529;
}

    #cotizador .btn-light:hover {
        background-color: #e2e6ea;
        border-color: #dae0e5;
    }

/* Outline secondary (por si lo usas en otros lugares del cotizador) */
#cotizador .btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
    background-color: transparent;
}

    #cotizador .btn-outline-secondary:hover {
        color: #fff;
        background-color: #6c757d;
        border-color: #6c757d;
    }

/* ====== Botones SOLO dentro del cotizador ====== */
#cotizador .btn {
    border-radius: .5rem;
}

/* Danger */
#cotizador .btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

    #cotizador .btn-danger:hover,
    #cotizador .btn-danger:focus {
        background-color: #bb2d3b;
        border-color: #b02a37;
        color: #fff;
    }

/* Success */
#cotizador .btn-success {
    background-color: #198754;
    border-color: #198754;
    color: #fff;
}

    #cotizador .btn-success:hover,
    #cotizador .btn-success:focus {
        background-color: #157347;
        border-color: #146c43;
        color: #fff;
    }

/* Tamaño pequeño consistente (por si el global lo pisa) */
#cotizador .btn-sm {
    padding: .25rem .5rem;
    font-size: .875rem;
    line-height: 1.5;
    border-radius: .3rem;
}

/* Evita desalineo de tiles si hay transform en ancestros */
#pickMapWrap, #pickMap {
    transform: none !important;
}
