/**
 * Heatmap Analytics Consent Banner Styles
 * CSS for GDPR Consent Management Interface
 * Version: 1.0.0
 */

/* =============================================================================
   Consent Banner
   ============================================================================= */

.wp-heatmap-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1d2327;
    color: #fff;
    z-index: 999999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.5;
}

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

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

.consent-message {
    flex: 1;
    min-width: 300px;
}

.consent-message h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.consent-message p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #c3c4c7;
    line-height: 1.4;
}

.consent-message a {
    color: #72aee6;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.consent-message a:hover,
.consent-message a:focus {
    color: #9ec2e6;
    outline: 2px solid #72aee6;
    outline-offset: 2px;
}

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

.consent-button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 80px;
}

.consent-button:focus {
    outline: 2px solid #72aee6;
    outline-offset: 2px;
}

.consent-accept {
    background: #00a32a;
    color: #fff;
}

.consent-accept:hover {
    background: #008a20;
    transform: translateY(-1px);
}

.consent-decline {
    background: #d63638;
    color: #fff;
}

.consent-decline:hover {
    background: #b32d2e;
    transform: translateY(-1px);
}

.consent-settings {
    background: transparent;
    color: #c3c4c7;
    border: 2px solid #c3c4c7;
}

.consent-settings:hover {
    background: #c3c4c7;
    color: #1d2327;
    transform: translateY(-1px);
}

/* =============================================================================
   Consent Modal
   ============================================================================= */

.consent-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.consent-modal[style*="block"] {
    opacity: 1;
    visibility: visible;
}

.consent-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.consent-modal[style*="block"] .consent-modal-content {
    transform: scale(1);
}

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

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

.consent-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.consent-modal-close:hover,
.consent-modal-close:focus {
    background: #f0f0f1;
    color: #1d2327;
    outline: 2px solid #0073aa;
}

.consent-modal-body {
    padding: 0 20px 20px 20px;
}

.consent-category {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f1;
}

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

.consent-category h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.consent-category p {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #646970;
    line-height: 1.5;
}

.consent-category label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #1d2327;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.consent-category label:hover {
    background: #f6f7f7;
}

.consent-category input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: #0073aa;
}

.consent-category input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.consent-modal-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
    text-align: right;
}

/* =============================================================================
   Responsive Design
   ============================================================================= */

@media (max-width: 768px) {
    .consent-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 15px;
    }
    
    .consent-message {
        min-width: auto;
        margin-bottom: 15px;
    }
    
    .consent-actions {
        justify-content: center;
    }
    
    .consent-button {
        flex: 1;
        min-width: 100px;
    }
    
    .consent-modal-content {
        margin: 10px;
        max-height: 90vh;
    }
    
    .consent-modal-header {
        padding: 15px 15px 0 15px;
    }
    
    .consent-modal-body {
        padding: 0 15px 15px 15px;
    }
    
    .consent-modal-footer {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .wp-heatmap-consent-banner {
        font-size: 13px;
    }
    
    .consent-message h3 {
        font-size: 16px;
    }
    
    .consent-message p {
        font-size: 13px;
    }
    
    .consent-button {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .consent-actions {
        flex-direction: column;
    }
    
    .consent-modal-header h3 {
        font-size: 18px;
    }
}

/* =============================================================================
   High Contrast Mode
   ============================================================================= */

@media (prefers-contrast: high) {
    .wp-heatmap-consent-banner {
        background: #000;
        border-top: 3px solid #fff;
    }
    
    .consent-accept {
        background: #008000;
        border: 2px solid #fff;
    }
    
    .consent-decline {
        background: #800000;
        border: 2px solid #fff;
    }
    
    .consent-settings {
        border: 2px solid #fff;
        color: #fff;
    }
    
    .consent-modal-content {
        border: 3px solid #000;
    }
    
    .consent-category {
        border-bottom: 2px solid #000;
    }
}

/* =============================================================================
   Reduced Motion
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
    .wp-heatmap-consent-banner,
    .consent-modal,
    .consent-modal-content,
    .consent-button {
        transition: none !important;
        transform: none !important;
    }
    
    .wp-heatmap-consent-banner.show {
        transform: none;
    }
    
    .consent-button:hover {
        transform: none !important;
    }
}

/* =============================================================================
   Print Styles
   ============================================================================= */

@media print {
    .wp-heatmap-consent-banner,
    .consent-modal {
        display: none !important;
    }
}

/* =============================================================================
   Dark Mode Support
   ============================================================================= */

@media (prefers-color-scheme: dark) {
    .consent-modal-content {
        background: #1d2327;
        color: #fff;
    }
    
    .consent-modal-header {
        border-bottom-color: #3c434a;
    }
    
    .consent-modal-header h3 {
        color: #fff;
    }
    
    .consent-modal-close {
        color: #c3c4c7;
    }
    
    .consent-modal-close:hover,
    .consent-modal-close:focus {
        background: #3c434a;
        color: #fff;
    }
    
    .consent-category {
        border-bottom-color: #3c434a;
    }
    
    .consent-category h4 {
        color: #fff;
    }
    
    .consent-category p {
        color: #c3c4c7;
    }
    
    .consent-category label {
        color: #fff;
    }
    
    .consent-category label:hover {
        background: #2c3338;
    }
    
    .consent-modal-footer {
        border-top-color: #3c434a;
    }
}

/* =============================================================================
   Focus Management and Accessibility
   ============================================================================= */

.wp-heatmap-modal-open {
    overflow: hidden;
}

/* Skip link for screen readers */
.consent-skip-link {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.consent-skip-link:focus {
    position: static;
    width: auto;
    height: auto;
    background: #0073aa;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 10px;
    display: inline-block;
}

/* Screen reader announcements */
.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;
}

/* Focus indicators */
.consent-button:focus,
.consent-category label:focus-within {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.consent-category input[type="checkbox"]:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* =============================================================================
   Animation Variations
   ============================================================================= */

/* Slide in from right variation */
.wp-heatmap-consent-banner.slide-right {
    transform: translateX(100%);
    bottom: 20px;
    right: 20px;
    left: auto;
    max-width: 400px;
    border-radius: 8px;
}

.wp-heatmap-consent-banner.slide-right.show {
    transform: translateX(0);
}

/* Top banner variation */
.wp-heatmap-consent-banner.top {
    bottom: auto;
    top: 0;
    transform: translateY(-100%);
}

.wp-heatmap-consent-banner.top.show {
    transform: translateY(0);
}

/* Compact banner variation */
.wp-heatmap-consent-banner.compact .consent-content {
    padding: 12px 20px;
}

.wp-heatmap-consent-banner.compact .consent-message h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.wp-heatmap-consent-banner.compact .consent-message p {
    font-size: 13px;
    margin-bottom: 4px;
}

.wp-heatmap-consent-banner.compact .consent-button {
    padding: 6px 12px;
    font-size: 12px;
}

/* =============================================================================
   Theme Customization Support
   ============================================================================= */

.wp-heatmap-consent-banner.custom-theme {
    background: var(--wp-heatmap-primary-color, #1d2327);
}

.wp-heatmap-consent-banner.custom-theme .consent-accept {
    background: var(--wp-heatmap-accent-color, #00a32a);
}

.wp-heatmap-consent-banner.custom-theme .consent-decline {
    background: var(--wp-heatmap-danger-color, #d63638);
}

.wp-heatmap-consent-banner.custom-theme .consent-settings {
    border-color: var(--wp-heatmap-text-color, #c3c4c7);
    color: var(--wp-heatmap-text-color, #c3c4c7);
}