/**
 * Estilos Frontend - Cordilheira LGPD
 */

/* Banner de Consentimento */
.clgpd-banner {
    position: fixed;
    z-index: 999999;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.clgpd-banner-bottom {
    bottom: 0;
    left: 0;
    right: 0;
}

.clgpd-banner-top {
    top: 0;
    left: 0;
    right: 0;
}

.clgpd-banner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.clgpd-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.clgpd-banner-text {
    flex: 1;
    min-width: 250px;
}

.clgpd-banner-text p {
    margin: 0 0 8px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.clgpd-privacy-link {
    color: #0073aa;
    text-decoration: underline;
    font-size: 13px;
}

.clgpd-privacy-link:hover {
    color: #005177;
}

.clgpd-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Botões */
.clgpd-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.clgpd-btn-primary {
    background: #0073aa;
    color: #fff;
}

.clgpd-btn-primary:hover {
    background: #005177;
}

.clgpd-btn-secondary {
    background: #f0f0f1;
    color: #2c3338;
}

.clgpd-btn-secondary:hover {
    background: #dcdcde;
}

.clgpd-btn-accept-all {
    background: #00a32a;
    color: #fff;
}

.clgpd-btn-accept-all:hover {
    background: #007a20;
}

.clgpd-btn-reject-all {
    background: #d63638;
    color: #fff;
}

.clgpd-btn-reject-all:hover {
    background: #b32d2e;
}

/* Modal de Personalização */
.clgpd-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999999;
}

.clgpd-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
}

.clgpd-modal-content {
    position: relative;
    max-width: 600px;
    max-height: 90vh;
    margin: 5vh auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.clgpd-modal-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clgpd-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.clgpd-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clgpd-modal-close:hover {
    color: #000;
}

.clgpd-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.clgpd-category-item {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
}

.clgpd-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.clgpd-category-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.clgpd-category-description {
    margin: 8px 0 0 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.clgpd-required-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #f0f0f1;
    color: #666;
    border-radius: 3px;
    font-size: 12px;
    margin-top: 8px;
}

/* Switch Toggle */
.clgpd-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.clgpd-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.clgpd-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.clgpd-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.clgpd-switch input:checked + .clgpd-slider {
    background-color: #0073aa;
}

.clgpd-switch input:checked + .clgpd-slider:before {
    transform: translateX(26px);
}

.clgpd-switch input:disabled + .clgpd-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.clgpd-modal-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Painel de Privacidade */
.clgpd-privacy-panel {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

.clgpd-privacy-panel h2 {
    margin-top: 0;
}

.clgpd-cookie-list {
    list-style: none;
    padding: 0;
}

.clgpd-cookie-item {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

.clgpd-cookie-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.clgpd-cookie-details {
    font-size: 14px;
    color: #666;
}

/* Widget Flutuante Minimizado */
.clgpd-floating-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999998;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.clgpd-floating-widget.clgpd-widget-visible {
    opacity: 1;
    transform: translateX(0);
}

.clgpd-widget-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.clgpd-widget-toggle:hover {
    background: #005177;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.clgpd-widget-toggle svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.clgpd-widget-text {
    white-space: nowrap;
}

/* Animação de entrada */
.clgpd-floating-widget {
    animation: clgpdWidgetSlideIn 0.3s ease-out;
}

@keyframes clgpdWidgetSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsivo */
@media (max-width: 768px) {
    .clgpd-banner-content {
        flex-direction: column;
        align-items: stretch;
    }

    .clgpd-banner-actions {
        flex-direction: column;
    }

    .clgpd-btn {
        width: 100%;
    }

    .clgpd-modal-content {
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .clgpd-floating-widget {
        bottom: 15px;
        right: 15px;
    }
    
    .clgpd-widget-toggle {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .clgpd-widget-text {
        display: none;
    }
    
    .clgpd-widget-toggle svg {
        width: 24px;
        height: 24px;
    }
}
