/* ================================================
   COOKIE CONSENT BANNER & MODAL
   ================================================ */

/* Cookie Banner - Bottom Left */
.cookie-consent {
    position: fixed;
    bottom: 20px;
    left: 20px;
    max-width: 420px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.cookie-content {
    padding: 24px;
}

.cookie-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    color: #21784D;
}

.cookie-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 12px 0;
    text-align: center;
}

.cookie-description {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #666666;
    margin: 0 0 20px 0;
    text-align: center;
}

.cookie-link {
    color: #21784D;
    text-decoration: underline;
    font-weight: 600;
}

.cookie-link:hover {
    color: #1b5e20;
}

.cookie-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cookie-btn {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.cookie-btn-accept {
    background: #21784D;
    color: #ffffff;
}

.cookie-btn-accept:hover {
    background: #1b5e20;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 120, 77, 0.3);
}

.cookie-btn-reject {
    background: #f5f5f5;
    color: #333333;
}

.cookie-btn-reject:hover {
    background: #e0e0e0;
}

.cookie-btn-customize {
    background: transparent;
    color: #21784D;
    border: 2px solid #21784D;
}

.cookie-btn-customize:hover {
    background: #21784D;
    color: #ffffff;
}

.cookie-btn-large {
    padding: 14px 24px;
    font-size: 15px;
}

/* Cookie Settings Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.cookie-modal-content {
    background: #ffffff;
    border-radius: 16px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid #e0e0e0;
}

.cookie-modal-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #000000;
    margin: 0;
}

.cookie-modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.cookie-modal-close:hover {
    background: #f5f5f5;
}

.cookie-modal-close svg {
    color: #666666;
}

.cookie-modal-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}

.cookie-modal-intro {
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #666666;
    margin: 0 0 28px 0;
}

.cookie-category {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e0e0e0;
}

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

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.cookie-category-info {
    flex: 1;
}

.cookie-category-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 6px 0;
}

.cookie-category-badge {
    display: inline-block;
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    background: #e8f5e9;
    color: #1b5e20;
    border-radius: 12px;
}

.cookie-category-description {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #666666;
    margin: 0;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

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

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

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

.cookie-toggle input:checked+.cookie-toggle-slider {
    background-color: #21784D;
}

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

.cookie-toggle input:disabled+.cookie-toggle-slider {
    background-color: #b0b0b0;
    cursor: not-allowed;
}

.cookie-modal-footer {
    padding: 20px 28px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
}

.cookie-modal-footer .cookie-btn {
    flex: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-consent {
        bottom: 10px;
        left: 10px;
        right: 10px;
        max-width: calc(100% - 20px);
    }

    .cookie-content {
        padding: 20px;
    }

    .cookie-title {
        font-size: 16px;
    }

    .cookie-description {
        font-size: 13px;
    }

    .cookie-btn {
        font-size: 13px;
        padding: 10px 16px;
    }

    .cookie-modal-content {
        width: calc(100% - 20px);
        max-width: calc(100% - 20px);
        margin: 20px 10px;
        max-height: calc(100vh - 40px);
    }

    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: 20px;
    }

    .cookie-modal-title {
        font-size: 20px;
    }

    .cookie-modal-footer {
        flex-direction: column;
    }

    .cookie-category-header {
        flex-direction: column;
        gap: 12px;
    }

    .cookie-toggle {
        align-self: flex-start;
    }
}


@media (max-width: 480px) {
    .cookie-consent {
        bottom: 10px;
        left: 10px;
        right: 10px;
        max-width: calc(100% - 20px);
        border-radius: 8px;
    }

    .cookie-content {
        padding: 16px;
    }

    .cookie-icon {
        margin-bottom: 12px;
    }

    .cookie-icon svg {
        width: 24px;
        height: 24px;
    }

    .cookie-title {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .cookie-description {
        font-size: 12px;
        margin-bottom: 16px;
    }

    .cookie-actions {
        gap: 8px;
    }

    .cookie-btn {
        font-size: 12px;
        padding: 10px 14px;
    }

    /* Cookie Modal Responsive */
    .cookie-modal-content {
        width: calc(100% - 20px);
        max-width: calc(100% - 20px);
        margin: 20px 10px;
        max-height: calc(100vh - 40px);
    }

    .cookie-modal-header {
        padding: 16px;
    }

    .cookie-modal-title {
        font-size: 18px;
    }

    .cookie-modal-body {
        padding: 16px;
    }

    .cookie-category {
        padding: 12px;
    }

    .cookie-category-title {
        font-size: 14px;
    }

    .cookie-category-description {
        font-size: 12px;
    }

    .cookie-modal-footer {
        padding: 16px;
        flex-direction: column;
        gap: 10px;
    }

    .cookie-btn-large {
        width: 100%;
    }
}

@media (max-width: 320px) {
    .cookie-consent {
        bottom: 8px;
        left: 8px;
        right: 8px;
        max-width: calc(100% - 16px);
    }

    .cookie-content {
        padding: 12px;
    }

    .cookie-title {
        font-size: 14px;
    }

    .cookie-description {
        font-size: 11px;
    }

    .cookie-btn {
        font-size: 11px;
        padding: 8px 12px;
    }

    .cookie-modal-content {
        margin: 10px 8px;
        max-height: calc(100vh - 20px);
    }
}

/* Media query original para mantener compatibilidad */
@media (max-width: 480px) {
    .cookie-content {
        padding: 20px;
    }

    .cookie-title {
        font-size: 16px;
    }

    .cookie-description {
        font-size: 13px;
    }

    .cookie-btn {
        font-size: 13px;
        padding: 10px 16px;
    }
}