/*
 * Public Consent Banner CSS - Consent Manager - GDPR & CCPA
 */

/* --- BANNER (Fixo) --- */
#wpcm-consent-banner {
    display: flex; padding: 24px; box-sizing: border-box; z-index: 999999;
    background-color: var(--wpcm-bg-color); color: var(--wpcm-text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
.wpcm-banner-position-footer {
    position: fixed; bottom: 0; left: 0; width: 100%;
    align-items: center; justify-content: space-between; flex-direction: row;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.15);
}
.wpcm-banner-position-bottom-left, .wpcm-banner-position-bottom-right {
    position: fixed; bottom: 20px; width: 400px; max-width: calc(100% - 40px);
    border-radius: 10px; flex-direction: column; box-shadow: 0 5px 25px rgba(0,0,0,0.2);
}
.wpcm-banner-position-bottom-left { left: 20px; }
.wpcm-banner-position-bottom-right { right: 20px; }

.wpcm-banner-position-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px; /* Largura padrão para o pop-up */
    max-width: calc(100% - 40px);
    border-radius: 10px;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3); /* Sombra mais forte para pop-up */
}
/* Ajuste de margem para o layout de pop-up */
.wpcm-banner-position-modal .wpcm-banner-content {
    margin-right: 0;
    margin-bottom: 15px;
}

#wpcm-consent-banner .wpcm-banner-content { flex: 1; margin-right: 20px; }
.wpcm-banner-position-bottom-left .wpcm-banner-content,
.wpcm-banner-position-bottom-right .wpcm-banner-content { margin-right: 0; margin-bottom: 15px; }

#wpcm-consent-banner .wpcm-banner-text {
    margin: 0; font-size: 14px; line-height: 1.5;
    color: inherit; font-weight: normal;
}
#wpcm-consent-banner .wpcm-policy-link {
    color: inherit; text-decoration: underline; margin-left: 5px;
}

#wpcm-consent-banner .wpcm-banner-actions {
    display: flex; align-items: center; justify-content: flex-end; gap: 10px;
}
#wpcm-consent-banner .wpcm-btn {
    border-radius: 6px; padding: 8px 15px; font-size: 13px;
    font-weight: 600; cursor: pointer; text-decoration: none;
    transition: all 0.2s ease; line-height: 1.2; border: 2px solid transparent;
    background-image: none; box-shadow: none; text-shadow: none;
    height: auto; min-height: 0;
}
#wpcm-consent-banner .wpcm-btn-accept {
    background-color: var(--wpcm-btn-accept-bg-color); color: var(--wpcm-btn-accept-text-color);
}
#wpcm-consent-banner .wpcm-btn-reject {
    background-color: transparent; border-color: var(--wpcm-btn-reject-border-color);
    color: var(--wpcm-btn-reject-text-color);
}
#wpcm-consent-banner .wpcm-btn-settings {
    background: transparent; color: var(--wpcm-text-color);
    border: none; text-decoration: underline; padding: 8px 5px;
}

/* --- MODAL (Reset Agressivo) --- */
#wpcm-modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6); z-index: 9999999;
    display: flex; align-items: center; justify-content: center; padding: 15px;
    backdrop-filter: blur(2px);
}
#wpcm-modal-wrap {
    background: #fff; width: 600px; max-width: 100%; max-height: 90vh;
    border-radius: 12px; box-shadow: 0 15px 50px rgba(0,0,0,0.3);
    display: flex; flex-direction: column; overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-align: left;
}
#wpcm-modal-wrap *, #wpcm-modal-wrap *::before, #wpcm-modal-wrap *::after {
    box-sizing: border-box;
}

#wpcm-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 25px; border-bottom: 1px solid #eee;
    background: #fff; flex-shrink: 0;
}
#wpcm-modal-title {
    font-size: 18px; font-weight: 700; color: #222;
    margin: 0; line-height: 1.2; padding: 0;
}
#wpcm-modal-close {
    background: transparent; border: none; font-size: 24px;
    line-height: 1; color: #999; cursor: pointer;
    padding: 0; width: auto; height: auto;
}

#wpcm-modal-body {
    padding: 0; overflow-y: auto; flex: 1;
}
#wpcm-modal-wrap .wpcm-category-row {
    padding: 20px 25px; border-bottom: 1px solid #f0f0f0;
}

/* --- CABEÇALHO DA CATEGORIA & BOTÃO EXPANDIR --- */
#wpcm-modal-wrap .wpcm-category-header {
    display: flex; align-items: center; margin-bottom: 10px;
}
#wpcm-modal-wrap .wpcm-category-expand {
    appearance: none; -webkit-appearance: none;
    background: transparent; border: none; border-radius: 4px;
    box-shadow: none; text-shadow: none;
    padding: 4px; margin: 0 10px 0 -5px;
    width: 24px; height: 24px; min-width: 0; min-height: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--wpcm-btn-accept-bg-color);
    font-size: 12px; line-height: 1;
    cursor: pointer; transition: transform 0.25s ease;
}
#wpcm-modal-wrap .wpcm-category-expand::before,
#wpcm-modal-wrap .wpcm-category-expand::after { display: none; content: none; }
#wpcm-modal-wrap .wpcm-category-expand[aria-expanded="true"] { transform: rotate(90deg); }

#wpcm-modal-wrap .wpcm-category-title {
    font-size: 16px; font-weight: 600; color: #222;
    margin: 0; line-height: 1.3;
}
#wpcm-modal-wrap .wpcm-category-description {
    font-size: 13px; color: #666; margin: 0;
    line-height: 1.5; padding-left: 28px;
}

/* --- TOGGLE SWITCH --- */
#wpcm-modal-wrap .wpcm-category-toggle { margin-left: auto; padding-left: 15px; }
#wpcm-modal-wrap .wpcm-toggle-switch {
    position: relative; width: 44px; height: 24px; flex-shrink: 0;
    min-width: 44px; display: inline-block;
}
#wpcm-modal-wrap .wpcm-toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
#wpcm-modal-wrap .wpcm-toggle-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc; transition: .3s; border-radius: 34px;
}
#wpcm-modal-wrap .wpcm-toggle-slider:before {
    position: absolute; content: ""; height: 18px; width: 18px;
    left: 3px; bottom: 3px; background-color: white;
    transition: .3s; border-radius: 50%;
}
#wpcm-modal-wrap input:checked + .wpcm-toggle-slider { background-color: var(--wpcm-btn-accept-bg-color); }
#wpcm-modal-wrap input:checked + .wpcm-toggle-slider:before { transform: translateX(20px); }

/* --- SUB-SERVIÇOS --- */
#wpcm-modal-wrap .wpcm-services-list {
    margin-top: 15px; padding: 0 0 0 30px; display: none;
}
#wpcm-modal-wrap .wpcm-service-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 15px; margin-bottom: 8px;
    background: #f7f7f7; border-radius: 8px; border: 1px solid #eee;
}
#wpcm-modal-wrap .wpcm-service-info { margin-right: 15px; }
#wpcm-modal-wrap .wpcm-service-title {
    font-size: 14px; font-weight: 600; color: #333;
    margin: 0 0 3px 0; line-height: 1.2;
    text-transform: none; letter-spacing: normal;
}
#wpcm-modal-wrap .wpcm-service-desc {
    font-size: 12px; color: #777; margin: 0; line-height: 1.4;
}
#wpcm-modal-wrap .wpcm-toggle-sm { width: 36px; height: 20px; min-width: 36px; }
#wpcm-modal-wrap .wpcm-toggle-sm .wpcm-toggle-slider:before {
    height: 14px; width: 14px; left: 3px; bottom: 3px;
}
#wpcm-modal-wrap .wpcm-toggle-sm input:checked + .wpcm-toggle-slider:before {
    transform: translateX(16px);
}

/* --- FOOTER DO MODAL --- */
#wpcm-modal-footer {
    padding: 15px 25px; border-top: 1px solid #eee;
    background: #fff; text-align: right; flex-shrink: 0;
}
#wpcm-modal-footer .wpcm-btn {
    margin: 0; padding: 10px 25px; font-size: 14px;
    background-color: var(--wpcm-btn-accept-bg-color);
    color: var(--wpcm-btn-accept-text-color);
    border-radius: 6px; font-weight: 600;
    border: none;
    box-shadow: none;
    cursor: pointer;
}

/* --- EFEITO HOVER GLOBAL --- */
#wpcm-consent-banner .wpcm-btn,
#wpcm-modal-wrap .wpcm-btn {
    transition: filter 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}
#wpcm-consent-banner .wpcm-btn:hover,
#wpcm-modal-wrap .wpcm-btn:hover {
    filter: brightness(0.85); /* Reduz o brilho em 15% */
}

/* --- RESPONSIVO --- */
@media (max-width: 768px) {
    #wpcm-consent-banner { flex-direction: column; }
    .wpcm-banner-position-footer .wpcm-banner-actions { margin-top: 15px; width: 100%; }
    .wpcm-banner-position-footer .wpcm-btn { flex: 1; text-align: center; }
    #wpcm-consent-banner .wpcm-banner-content { margin-right: 0; }
    .wpcm-banner-position-bottom-left, .wpcm-banner-position-bottom-right {
        width: auto; left: 15px; right: 15px; bottom: 15px;
    }
    
    /* Regra responsiva para o novo modal */
    .wpcm-banner-position-modal {
        width: auto; left: 15px; right: 15px;
    }
    
    #wpcm-modal-wrap { height: 100%; max-height: 100%; border-radius: 0; }
}
/* --- Estilos do Branding "Powered by" --- */
.wpcm-branding {
    text-align: center;
    margin: 12px 10px 0 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(128, 128, 128, 0.2);
}

.wpcm-branding a {
    font-size: 12px;
    color: var(--wpcm-text-color); /* Usa a cor de texto principal */
    opacity: 0.7;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.wpcm-branding a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Ajuste para o banner de rodapé */
.wpcm-banner-position-footer .wpcm-branding {
    margin-top: 0;
    margin-left: 20px;
    padding-top: 0;
    border-top: 0;
    text-align: left;
}
.wpcm-banner-position-footer .wpcm-branding a {
    font-size: 13px;
}