/**
 * Estilos do frontend - Gerenciador de Cookies
 */

/* Reset e configurações básicas */
.gdc-cookie-banner,
.gdc-modal,
.gdc-cookie-banner *,
.gdc-modal * {
    box-sizing: border-box;
}

/* Banner de Cookies */
.gdc-cookie-banner {
    position: fixed;
    bottom: 20px;
    left: inherit;
    right: 20px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999999999;
    padding: 20px;
    transform: translateY(100%);
    border-radius: 20px;
    max-width: 544px;
    transition: transform 0.4s cubic-bezier(0.2, 0.85, 0.32, 1.2);
}

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

.gdc-consent-form {
    margin: 0;
}

.gdc-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.gdc-banner-icon {
    font-size: 32px;
    flex-shrink: 0;
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.gdc-banner-text {
    flex: 1;
    min-width: 300px;
}

.gdc-banner-text h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.gdc-banner-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

.gdc-banner-actions {
    display: flex;
    gap: 18px;
    flex-shrink: 0;
    width: 100%;
    justify-content: flex-end;
}

/* Botões */
.gdc-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.gdc-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.gdc-btn:hover:before {
    left: 100%;
}

.gdc-btn-primary {
    background: #FC9644;
    color: white;
}

.gdc-btn-primary:hover {
    background: #FC9644;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgb(255 201 158);
}

.gdc-btn-secondary {
    background: #ffffff;
    color: #495057;
    border: 1px solid #D9D9D9;
}

.gdc-btn-secondary:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

.gdc-btn-outline {
    background: transparent;
    color: #090909;
    border: 1px solid #D9D9D9;
}

.gdc-btn-outline:hover {
    background: #D9D9D9;
    transform: translateY(-1px);
}

/* Modal */
.gdc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.gdc-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.gdc-modal-dialog {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.2, 0.85, 0.32, 1.2);
}

.gdc-modal.gdc-show .gdc-modal-dialog {
    transform: scale(1) translateY(0);
}

.gdc-modal-content {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.gdc-modal-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 0;
}

.gdc-modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.gdc-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gdc-modal-close:hover {
    background: #f0f0f0;
    color: #666;
}

.gdc-modal-body {
    padding: 0 24px 24px 24px;
    overflow-y: auto;
    flex: 1;
}

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

.gdc-modal-footer {
    padding: 20px 24px 24px 24px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Categorias de Cookies */
.gdc-cookie-category {
    margin-bottom: 12px;
    border: 1px solid #D9D9D9;
    border-radius: 12px;
    background: white;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

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

.gdc-cookie-category:hover {
    border-color: #e0e0e0;
}

.gdc-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
}

.gdc-category-header:hover {
    background: #fafafa;
}

.gdc-category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.gdc-category-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.gdc-category-title h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.gdc-category-header.gdc-expanded .gdc-category-icon {
    transform: rotate(180deg);
}

.gdc-category-status,
.gdc-category-toggle {
    flex-shrink: 0;
}

.gdc-always-active {
    color: #090909;
    font-size: 14px;
    font-weight: 500;
}

/* Toggle Switches */
.gdc-toggle {
    position: relative;
    display: inline-block;
    width: 35px;
    height: 20px;
    cursor: pointer;
    outline: none;
}

.gdc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.gdc-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.2, 0.85, 0.32, 1.2);
    box-shadow: none!important;
}

.gdc-toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 4px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.2, 0.85, 0.32, 1.2);
}

.gdc-toggle input:checked + .gdc-toggle-slider {
    background: #E58635;
}

.gdc-toggle input:checked + .gdc-toggle-slider:before {
    left: -5px;
    transform: translateX(22px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.gdc-toggle:hover .gdc-toggle-slider {
    transform: scale(1.05);
}

.gdc-toggle input:focus + .gdc-toggle-slider {
    outline: none;
}

/* Conteúdo das Categorias */
.gdc-category-content {
    padding: 14px 20px 14px 50px;
    background: #ffffff;
    animation: slideDown 0.3s ease;
}

.gdc-category-content p {
    margin: 0;
    font-size: 12px;
    line-height: 150%;
    color: #515151;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 300px;
        padding-top: 0;
        padding-bottom: 20px;
    }
}

/* Loading States */
.gdc-loading {
    position: relative;
    pointer-events: none;
}

.gdc-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notificações */
.gdc-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    padding: 12px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.2, 0.85, 0.32, 1.2);
}

.gdc-notification.gdc-show {
    transform: translateX(0);
    opacity: 1;
}

.gdc-notification-success {
    background: #FC9644;
}

.gdc-notification-error {
    background: #dc3545;
}

.gdc-notification-info {
    background: #FC9644;
}

.gdc-notification .gdc-notification-close{
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: none;
    background: #fff;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Shortcode button */
.gdc-settings-link {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.gdc-settings-link:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
    text-decoration: none;
}

/* Responsividade */
@media (max-width: 768px) {
    .gdc-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .gdc-banner-text {
        min-width: auto;
    }
    
    .gdc-banner-actions {
        width: 100%;
        justify-content: center;
    }
    
    .gdc-btn {
        flex: 1;
        max-width: 200px;
    }
    
    .gdc-modal-dialog {
        width: 95%;
        margin: 20px;
    }
    
    .gdc-modal-header,
    .gdc-modal-body,
    .gdc-modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .gdc-modal-footer {
        justify-content: center;
    }
    
    .gdc-modal-footer .gdc-btn {
        width: 100%;
    }
    
    .gdc-category-header {
        padding: 16px;
    }
    
    .gdc-category-content {
        padding: 14px 16px 14px 16px;
    }
    
    .gdc-notification {
        left: 10px;
        right: 10px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .gdc-notification.gdc-show {
        transform: translateY(0);
    }
}

@media (max-width: 576px) {
    .gdc-cookie-banner {
        left: 0;
        bottom: 0;
        right: inherit;
        padding: 16px;
        border-radius: 20px 20px 0 0;
    }
    
    .gdc-banner-text h4 {
        font-size: 16px;
    }
    
    .gdc-banner-text p {
        font-size: 13px;
    }
    
    .gdc-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .gdc-category-title h4 {
        font-size: 14px;
    }
    
    .gdc-toggle {
        width: 44px;
        height: 26px;
    }
    
    .gdc-toggle-slider:before {
        height: 20px;
        width: 20px;
    }
    
    .gdc-toggle input:checked + .gdc-toggle-slider:before {
        left: -3px;
    }

    .gdc-modal-header h3 {
        font-size: 18px;
    }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Estados de foco para acessibilidade */
.gdc-btn:focus,
.gdc-modal-close:focus,
.gdc-category-header:focus,
.gdc-toggle:focus-within {
    outline: 1px solid #FC9644;
    outline-offset: 4px;
}

/* Melhorias para screen readers */
.gdc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
} 