/* =====================================================
   Header Utilities – estilo coherente con el tema
   Archivo: css/CanariasTicket/LayoutTravelu.css
   ===================================================== */

.header-section .container-fluid {
    padding: 0 10%;
}

.header-main {
    justify-content: space-between !important;
}

/* ---- Contenedor de utilidades ---- */
.ct-header-utils {
    gap: 6px;
    flex-shrink: 0;
}

/* ============================================================
   DROPDOWN BASE (compartido por idioma y cuenta de usuario)
   ============================================================ */
.ct-lang-selector,
.ct-account-selector {
    position: relative;
}

/* Botón disparador común */
.ct-lang-btn,
.ct-account-btn {
    background: transparent;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    font-family: "Nunito", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--header, #151415);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.3;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}

.ct-lang-btn:hover,
.ct-account-btn:hover {
    color: var(--theme-color);
    background: rgba(0, 0, 0, 0.04);
}

/* Chevron animado */
.ct-lang-chevron {
    font-size: 10px !important;
    transition: transform 0.2s;
}

.ct-lang-selector.is-open .ct-lang-chevron,
.ct-account-selector.is-open .ct-lang-chevron {
    transform: rotate(180deg);
}

/* Panel desplegable común */
.ct-lang-dropdown,
.ct-account-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
    min-width: 160px;
    z-index: 10000;
    padding: 6px 0;
    animation: ct-fadein 0.14s ease;
}

.ct-lang-selector.is-open .ct-lang-dropdown,
.ct-account-selector.is-open .ct-account-dropdown {
    display: block;
}

@keyframes ct-fadein {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SELECTOR DE IDIOMA
   ============================================================ */
.ct-lang-btn .fa-globe {
    font-size: 15px;
    color: var(--theme-color);
}

.ct-lang-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    font-family: "Nunito", sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--header, #151415);
    text-decoration: none !important;
    transition: background 0.12s, color 0.12s;
    cursor: pointer;
}

.ct-lang-item:hover {
    background: #f6f6f6;
    color: var(--theme-color);
}

.ct-lang-item.ct-lang-active {
    color: var(--theme-color);
    font-weight: 700;
}

/* ============================================================
   BOTONES DE SESIÓN (no autenticado)
   ============================================================ */

/* Iniciar sesión — texto puro con hover */
.ct-btn-login {
    font-family: "Nunito", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--header, #151415) !important;
    text-decoration: none !important;
    padding: 7px 12px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.ct-btn-login:hover {
    color: var(--theme-color) !important;
    background: rgba(0, 0, 0, 0.04);
}

/* Registrarse — réplica del .theme-btn del tema */
.ct-btn-register {
    font-family: "Nunito", sans-serif;
    font-size: 14px;
    font-weight: 800;
    background-color: var(--theme-color);
    color: #fff !important;
    text-decoration: none !important;
    padding: 7px 18px;
    border-radius: 72px;
    transition: opacity 0.2s, background-color 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    line-height: 1.4;
}

.ct-btn-register:hover {
    color: #fff !important;
    opacity: 0.88;
}

/* CTA Alquiler de coches — pill con borde en color de marca */
.ct-btn-cicar {
    font-family: "Nunito", sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--theme-color) !important;
    text-decoration: none !important;
    padding: 7px 16px;
    border: 1px solid var(--theme-color);
    border-radius: 72px;
    transition: color 0.2s, background-color 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    line-height: 1.4;
}

.ct-btn-cicar:hover {
    background-color: var(--theme-color);
    color: #fff !important;
}

/* ============================================================
   DROPDOWN DE ÁREA CLIENTE (autenticado)
   ============================================================ */
.ct-account-btn .fa-user-circle {
    font-size: 18px;
    color: var(--theme-color);
}

.ct-account-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    font-family: "Nunito", sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--header, #151415);
    text-decoration: none !important;
    transition: background 0.12s, color 0.12s;
}

.ct-account-item:hover {
    background: #f6f6f6;
    color: var(--theme-color);
}

.ct-account-item .fa-fw {
    font-size: 13px;
    color: var(--theme-color);
    opacity: 0.75;
}

.ct-account-divider {
    height: 1px;
    background: #ebebeb;
    margin: 4px 0;
}

.ct-logout-item {
    color: #c0392b;
}

.ct-logout-item:hover {
    background: #fff5f5;
    color: #c0392b;
}

.ct-logout-item .fa-fw {
    color: #c0392b;
    opacity: 0.85;
}

/* ============================================================
   CARRITO
   ============================================================ */
.ct-btn-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--header, #151415) !important;
    text-decoration: none !important;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.ct-btn-cart:hover {
    color: var(--theme-color) !important;
    background: rgba(0, 0, 0, 0.05);
}

.ct-cart-icon {
    font-size: 17px;
}

.ct-cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--theme-color);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    min-width: 15px;
    height: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
    font-family: "Nunito", sans-serif;
}

/* ============================================================
   ADAPTACIÓN AL HEADER STICKY (fondo blanco al hacer scroll)
   El tema añade la clase "sticky" al wrapper #header-sticky
   ============================================================ */
.sticky .ct-lang-btn,
.sticky .ct-account-btn,
.sticky .ct-btn-login,
.sticky .ct-btn-cart {
    color: var(--header, #151415);
}

.sticky .ct-btn-register {
    background-color: var(--theme-color);
}

/* ============================================================
   BOTÓN FLOTANTE CTA
   ============================================================ */
.ct-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9998;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--theme-color);
    color: #fff !important;
    text-decoration: none !important;
    font-family: "Nunito", sans-serif;
    font-size: 15px;
    font-weight: 800;
    padding: 13px 24px;
    border-radius: 72px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.20);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: ct-float-pulse 2.8s ease-in-out infinite;
}

.ct-float-btn:hover {
    color: #fff !important;
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
}

.ct-float-btn .fa-ticket-alt {
    font-size: 16px;
}

/* Pulso sutil para llamar la atención */
@keyframes ct-float-pulse {
    0%, 100% {
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.20),
                    0 0 0 0 rgba(151, 191, 31, 0.45);
    }
    55% {
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.20),
                    0 0 0 10px rgba(151, 191, 31, 0);
    }
}

@media (max-width: 767px) {
    .ct-float-btn {
        bottom: 20px;
        right: 16px;
        font-size: 13px;
        padding: 10px 18px;
        gap: 6px;
    }

    .ct-float-btn .fa-ticket-alt {
        font-size: 14px;
    }
}
