/**
 * Sistema de Gestión de Cookies - Tri-Consulting
 * Estilos CSS
 * Versión: 2.0 - Enero 2026
 */

/* ========================================
   BANNER DE COOKIES
   ======================================== */

.tri-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 999999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Source Sans Pro', Arial, sans-serif;
}

.tri-cookie-banner.show {
    transform: translateY(0);
}

.tri-cookie-banner__content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 25px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.tri-cookie-banner__text {
    flex: 1;
    min-width: 0;
}

.tri-cookie-banner__description {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.6;
    color: #333333;
}

.tri-cookie-banner__link {
    font-size: 17px;
    color: #1f628d;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.tri-cookie-banner__link:hover {
    color: #07b99e;
}

.tri-cookie-banner__buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* ========================================
   BOTONES
   ======================================== */

.tri-cookie-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: 'Source Sans Pro', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tri-cookie-btn--accept {
    background-color: #07b99e;
    color: #ffffff;
    border-color: #07b99e;
}

.tri-cookie-btn--accept:hover {
    background-color: #059480;
    border-color: #059480;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(7, 185, 158, 0.3);
}

.tri-cookie-btn--reject {
    background-color: transparent;
    color: #666666;
    border-color: #cccccc;
}

.tri-cookie-btn--reject:hover {
    background-color: #f5f5f5;
    border-color: #999999;
    color: #333333;
}

.tri-cookie-btn--customize {
    background-color: transparent;
    color: #1f628d;
    border-color: #1f628d;
}

.tri-cookie-btn--customize:hover {
    background-color: #1f628d;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(31, 98, 141, 0.3);
}

/* ========================================
   BOTÓN FLOTANTE
   ======================================== */

.tri-cookie-float-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #07b99e 0%, #059480 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(7, 185, 158, 0.4);
    cursor: pointer;
    z-index: 999998;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.tri-cookie-float-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 16px rgba(7, 185, 158, 0.5);
}

.tri-cookie-float-btn:active {
    transform: scale(0.95);
}

/* ========================================
   MODAL DE PERSONALIZACIÓN
   ======================================== */

.tri-cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000000;
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.tri-cookie-modal.show {
    opacity: 1;
    visibility: visible;
}

.tri-cookie-modal__content {
    background: #ffffff;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.tri-cookie-modal.show .tri-cookie-modal__content {
    transform: scale(1);
}

.tri-cookie-modal__header {
    padding: 25px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tri-cookie-modal__header h3 {
    margin: 0;
    font-size: 22px;
    color: #333333;
    font-weight: 600;
}

.tri-cookie-modal__close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #999999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.tri-cookie-modal__close:hover {
    background-color: #f5f5f5;
    color: #333333;
}

.tri-cookie-modal__body {
    padding: 30px;
}

.tri-cookie-modal__footer {
    padding: 20px 30px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
}

/* ========================================
   CATEGORÍAS DE COOKIES
   ======================================== */

.tri-cookie-category {
    margin-bottom: 25px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 4px solid #07b99e;
}

.tri-cookie-category:last-child {
    margin-bottom: 0;
}

.tri-cookie-category__header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.tri-cookie-category h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333333;
    font-weight: 600;
}

.tri-cookie-category p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #666666;
}

/* ========================================
   SWITCH DE TOGGLE
   ======================================== */

.tri-cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.tri-cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.tri-cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cccccc;
    transition: 0.3s;
    border-radius: 26px;
}

.tri-cookie-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.tri-cookie-switch input:checked + .tri-cookie-slider {
    background-color: #07b99e;
}

.tri-cookie-switch input:checked + .tri-cookie-slider:before {
    transform: translateX(24px);
}

.tri-cookie-switch input:disabled + .tri-cookie-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media screen and (max-width: 768px) {
    .tri-cookie-banner__content {
        flex-direction: column;
        align-items: stretch;
        padding: 20px 20px;
        gap: 20px;
    }

    .tri-cookie-banner__buttons {
        flex-direction: column;
        gap: 10px;
    }

    .tri-cookie-btn {
        width: 100%;
        padding: 14px 20px;
    }

    .tri-cookie-modal__content {
        margin: 20px;
    }

    .tri-cookie-modal__header {
        padding: 20px;
    }

    .tri-cookie-modal__header h3 {
        font-size: 20px;
    }

    .tri-cookie-modal__body {
        padding: 20px;
    }

    .tri-cookie-modal__footer {
        padding: 15px 20px;
    }

    .tri-cookie-category {
        padding: 15px;
    }

    .tri-cookie-float-btn {
        bottom: 15px;
        left: 15px;
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
}

@media screen and (max-width: 480px) {
    .tri-cookie-banner__description {
        font-size: 14px;
    }

    .tri-cookie-modal {
        padding: 10px;
    }

    .tri-cookie-category__header {
        flex-direction: column;
        gap: 10px;
    }
}

/* ========================================
   ACCESIBILIDAD
   ======================================== */

.tri-cookie-btn:focus,
.tri-cookie-modal__close:focus,
.tri-cookie-float-btn:focus {
    outline: 2px solid #07b99e;
    outline-offset: 2px;
}

.tri-cookie-switch input:focus + .tri-cookie-slider {
    box-shadow: 0 0 0 3px rgba(7, 185, 158, 0.3);
}

/* ========================================
   ANIMACIONES
   ======================================== */

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.tri-cookie-float-btn {
    animation: pulse 2s ease-in-out infinite;
}

.tri-cookie-float-btn:hover {
    animation: none;
}

/* ========================================
   MODO OSCURO (OPCIONAL)
   ======================================== */

@media (prefers-color-scheme: dark) {
    .tri-cookie-banner {
        background: #1a1a1a;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    }

    .tri-cookie-banner__description {
        color: #e0e0e0;
    }

    .tri-cookie-modal__content {
        background: #1a1a1a;
    }

    .tri-cookie-modal__header,
    .tri-cookie-modal__footer {
        border-color: #333333;
    }

    .tri-cookie-modal__header h3 {
        color: #ffffff;
    }

    .tri-cookie-category {
        background: #252525;
    }

    .tri-cookie-category h4 {
        color: #ffffff;
    }

    .tri-cookie-category p {
        color: #b0b0b0;
    }
}