/* ============================================================================
   CANARIASAPART - COOKIE CONSENT BANNER
   Ubicación: wwwroot/css/front/cookie-consent.css
   Incluir en TODAS las páginas públicas
   ============================================================================ */

/* ===== OVERLAY ===== */
.cc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(3px);
    animation: ccFadeIn 0.3s ease;
}

@keyframes ccFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ccSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== BANNER PRINCIPAL ===== */
.cc-banner,
.cc-settings {
    background: #fff;
    border-radius: 16px 16px 12px 12px;
    max-width: 640px;
    width: 100%;
    box-shadow: 0 -8px 50px rgba(0, 0, 0, 0.15);
    animation: ccSlideUp 0.35s ease;
    max-height: 90vh;
    overflow-y: auto;
}

/* --- Header --- */
.cc-banner-header {
    padding: 22px 28px 0;
}

.cc-banner-header h3 {
    font-family: 'DM Sans', 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.cc-banner-header h3 i {
    color: #008572;
    font-size: 20px;
}

/* --- Body --- */
.cc-banner-body {
    padding: 16px 28px 8px;
}

.cc-banner-body p {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    line-height: 1.65;
    color: #555;
    margin: 0 0 10px;
}

.cc-more-info {
    font-size: 13px !important;
    color: #888 !important;
}

.cc-more-info a {
    color: #008572;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s;
}

.cc-more-info a:hover {
    color: #006B5C;
}

/* --- Actions --- */
.cc-banner-actions,
.cc-settings-actions {
    display: flex;
    gap: 10px;
    padding: 18px 28px 22px;
    flex-wrap: wrap;
}

/* ===== BOTONES ===== */
.cc-btn {
    flex: 1;
    min-width: 120px;
    padding: 13px 18px;
    border: none;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.3px;
}

.cc-btn-accept {
    background: #008572;
    color: white;
}

.cc-btn-accept:hover {
    background: #006B5C;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 133, 114, 0.3);
}

.cc-btn-reject {
    background: #f5f5f5;
    color: #555;
    border: 1px solid #e0e0e0;
}

.cc-btn-reject:hover {
    background: #eee;
    border-color: #ccc;
}

.cc-btn-settings {
    background: transparent;
    color: #008572;
    border: 2px solid #008572;
}

.cc-btn-settings:hover {
    background: rgba(0, 133, 114, 0.06);
}

.cc-btn-save {
    background: linear-gradient(135deg, #dfbb3e, #C9A227);
    color: white;
}

.cc-btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(223, 187, 62, 0.35);
}

/* ===== SETTINGS PANEL ===== */
.cc-settings-header {
    padding: 20px 28px 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.cc-settings-header h3 {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.cc-back-btn {
    background: none;
    border: none;
    color: #008572;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s;
}

.cc-back-btn:hover {
    background: rgba(0, 133, 114, 0.08);
}

.cc-settings-body {
    padding: 18px 28px 8px;
}

/* ===== CATEGORÍA DE COOKIES ===== */
.cc-category {
    padding: 18px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cc-category:last-child {
    border-bottom: none;
}

.cc-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.cc-category-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cc-category-info h4 {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.cc-badge-required {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(0, 133, 114, 0.1);
    color: #008572;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 4px;
    font-family: 'DM Sans', sans-serif;
}

.cc-category-desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    line-height: 1.6;
    color: #888;
    margin: 0;
}

/* ===== TOGGLE DESHABILITADO (Necesarias) ===== */
.cc-toggle {
    position: relative;
    flex-shrink: 0;
}

.cc-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cc-toggle label {
    display: block;
    width: 44px;
    height: 24px;
    background: #008572;
    border-radius: 12px;
    cursor: not-allowed;
    position: relative;
    opacity: 0.6;
}

.cc-toggle label::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 23px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* ===== BOTONES ACEPTAR/RECHAZAR POR CATEGORÍA ===== */
.cc-toggle-buttons {
    display: flex;
    gap: 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.cc-cat-btn {
    padding: 7px 14px;
    border: none;
    background: #f9f9f9;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #888;
}

.cc-cat-btn:first-child {
    border-right: 1px solid #e0e0e0;
}

.cc-cat-reject.active {
    background: #fff0f0;
    color: #d33;
}

.cc-cat-accept.active {
    background: #e8f5f2;
    color: #008572;
}

/* ===== BOTÓN FLOTANTE (cookie) ===== */
.cc-float-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #008572;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 133, 114, 0.35);
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    animation: ccFadeIn 0.4s ease;
}

.cc-float-btn:hover {
    background: #006B5C;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 133, 114, 0.45);
}

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
    .cc-overlay {
        align-items: center;
        padding: 24px;
    }

    .cc-banner,
    .cc-settings {
        border-radius: 16px;
    }

    .cc-banner-actions .cc-btn,
    .cc-settings-actions .cc-btn {
        min-width: 140px;
    }
}

@media (max-width: 480px) {
    .cc-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .cc-banner,
    .cc-settings {
        border-radius: 16px 16px 0 0;
        max-height: 85vh;
    }

    .cc-banner-header,
    .cc-banner-body,
    .cc-banner-actions,
    .cc-settings-header,
    .cc-settings-body,
    .cc-settings-actions {
        padding-left: 20px;
        padding-right: 20px;
    }

    .cc-banner-actions,
    .cc-settings-actions {
        flex-direction: column;
    }

    .cc-btn {
        min-width: 100%;
    }

    .cc-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .cc-float-btn {
        bottom: 16px;
        left: 16px;
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
}
