/* Cookie Consent Banner - Discreto y no intrusivo */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    padding: 16px 20px;
    display: none;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    border-top: 1px solid #e0e0e0;
}

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

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-consent-text {
    flex: 1;
    min-width: 250px;
}

.cookie-consent-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.cookie-consent-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-cookie-accept,
.btn-cookie-reject,
.btn-cookie-manage {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
}

.btn-text {
    display: inline;
}

.btn-icon {
    display: none;
}

.btn-cookie-accept {
    background: #4285f4;
    color: white;
}

.btn-cookie-accept:hover {
    background: #357ae8;
}

.btn-cookie-reject {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

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

.btn-cookie-manage {
    background: transparent;
    color: #4285f4;
    border: 1px solid #4285f4;
}

.btn-cookie-manage:hover {
    background: #f0f7ff;
}

/* Modal de preferencias */
.cookie-consent-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    padding: 20px;
}

.cookie-consent-modal.show {
    opacity: 1;
}

.cookie-consent-modal-content {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

.cookie-consent-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.cookie-consent-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
}

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

.cookie-consent-modal-body {
    padding: 24px;
}

.cookie-consent-intro {
    margin: 0 0 24px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.cookie-preference-item {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.cookie-preference-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.cookie-preference-header {
    margin-bottom: 8px;
}

.cookie-preference-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    font-size: 15px;
}

.cookie-preference-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4285f4;
}

.cookie-preference-label input[type="checkbox"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-preference-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #666;
    padding-left: 30px;
}

.cookie-consent-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
}

.btn-cookie-save {
    padding: 10px 24px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-cookie-save:hover {
    background: #357ae8;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-consent-banner {
        padding: 8px 10px;
    }
    
    .cookie-consent-content {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    
    .cookie-consent-text {
        margin-bottom: 0;
        min-width: 0;
        flex: 1;
        overflow: hidden;
    }
    
    .cookie-consent-text p {
        font-size: 11px;
        line-height: 1.3;
        margin: 0;
    }
    
    .cookie-consent-buttons {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 6px;
        flex-shrink: 0;
        align-items: center;
    }
    
    .btn-cookie-accept,
    .btn-cookie-reject,
    .btn-cookie-manage {
        width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        min-width: 36px !important;
        max-width: 36px !important;
        flex-shrink: 0;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    .btn-text {
        display: none !important;
    }
    
    .btn-icon {
        display: block !important;
        font-size: 20px;
        font-weight: bold;
        line-height: 1;
        margin: 0;
        padding: 0;
    }
    
    .btn-cookie-accept {
        background: #4caf50 !important;
        color: white !important;
        border: none !important;
    }
    
    .btn-cookie-accept:hover,
    .btn-cookie-accept:active {
        background: #45a049 !important;
    }
    
    .btn-cookie-reject {
        background: #f44336 !important;
        color: white !important;
        border: none !important;
    }
    
    .btn-cookie-reject:hover,
    .btn-cookie-reject:active {
        background: #da190b !important;
    }
    
    .btn-cookie-manage {
        background: #ffc107 !important;
        color: #333 !important;
        border: none !important;
    }
    
    .btn-cookie-manage:hover,
    .btn-cookie-manage:active {
        background: #ffb300 !important;
    }
    
    .cookie-consent-modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .cookie-consent-modal-header {
        padding: 16px 20px;
    }
    
    .cookie-consent-modal-header h3 {
        font-size: 18px;
    }
    
    .cookie-consent-modal-body {
        padding: 20px;
    }
    
    .cookie-consent-intro {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    .cookie-preference-item {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
    
    .cookie-preference-label {
        font-size: 14px;
    }
    
    .cookie-preference-desc {
        padding-left: 0;
        margin-top: 8px;
        font-size: 12px;
    }
    
    .cookie-consent-modal-footer {
        padding: 16px 20px;
    }
    
    .btn-cookie-save {
        width: 100%;
        padding: 10px 20px;
    }
}
