/**
 * Frontend styles for WP Heatmap
 */

/* Heatmap overlay styles */
.wp-heatmap-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
}

.wp-heatmap-overlay.active {
    display: flex;
}

.wp-heatmap-modal {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.wp-heatmap-modal h3 {
    margin: 0 0 15px 0;
    color: #23282d;
}

.wp-heatmap-modal p {
    margin: 0 0 20px 0;
    color: #666;
    line-height: 1.5;
}

.wp-heatmap-modal .buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.wp-heatmap-modal .button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.wp-heatmap-modal .button-primary {
    background: #0073aa;
    color: #fff;
}

.wp-heatmap-modal .button-primary:hover {
    background: #005177;
}

.wp-heatmap-modal .button-secondary {
    background: #f1f1f1;
    color: #23282d;
    border: 1px solid #ccd0d4;
}

.wp-heatmap-modal .button-secondary:hover {
    background: #e1e1e1;
}

/* Cookie consent banner */
.wp-heatmap-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #23282d;
    color: #fff;
    padding: 15px 20px;
    z-index: 999998;
    display: none;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.wp-heatmap-cookie-banner.active {
    display: flex;
}

.wp-heatmap-cookie-banner .content {
    flex: 1;
    min-width: 250px;
}

.wp-heatmap-cookie-banner .content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.wp-heatmap-cookie-banner .content a {
    color: #72aee6;
    text-decoration: none;
}

.wp-heatmap-cookie-banner .content a:hover {
    text-decoration: underline;
}

.wp-heatmap-cookie-banner .buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.wp-heatmap-cookie-banner .button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.wp-heatmap-cookie-banner .button-accept {
    background: #00a32a;
    color: #fff;
}

.wp-heatmap-cookie-banner .button-accept:hover {
    background: #008a20;
}

.wp-heatmap-cookie-banner .button-decline {
    background: #f1f1f1;
    color: #23282d;
}

.wp-heatmap-cookie-banner .button-decline:hover {
    background: #e1e1e1;
}

/* Heatmap visualization styles */
.wp-heatmap-heatmap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.wp-heatmap-heatmap-point {
    position: absolute;
    border-radius: 50%;
    opacity: 0.7;
    pointer-events: none;
    transition: all 0.3s ease;
}

.wp-heatmap-heatmap-point:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Loading indicator */
.wp-heatmap-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    z-index: 999999;
    display: none;
}

.wp-heatmap-loading.active {
    display: block;
}

.wp-heatmap-loading .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: wp-heatmap-spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes wp-heatmap-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Debug mode styles */
.wp-heatmap-debug {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    z-index: 999997;
    max-width: 300px;
    display: none;
}

.wp-heatmap-debug.active {
    display: block;
}

.wp-heatmap-debug .debug-item {
    margin-bottom: 5px;
}

.wp-heatmap-debug .debug-item:last-child {
    margin-bottom: 0;
}

.wp-heatmap-debug .debug-label {
    font-weight: bold;
    margin-right: 5px;
}

/* Responsive design */
@media (max-width: 768px) {
    .wp-heatmap-modal {
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .wp-heatmap-cookie-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .wp-heatmap-cookie-banner .content {
        min-width: auto;
    }
    
    .wp-heatmap-cookie-banner .buttons {
        width: 100%;
        justify-content: center;
    }
    
    .wp-heatmap-cookie-banner .button {
        flex: 1;
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .wp-heatmap-modal .buttons {
        flex-direction: column;
    }
    
    .wp-heatmap-modal .button {
        width: 100%;
    }
    
    .wp-heatmap-cookie-banner .buttons {
        flex-direction: column;
    }
    
    .wp-heatmap-cookie-banner .button {
        max-width: none;
    }
}

/* Print styles */
@media print {
    .wp-heatmap-overlay,
    .wp-heatmap-cookie-banner,
    .wp-heatmap-loading,
    .wp-heatmap-debug {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wp-heatmap-modal {
        border: 2px solid #000;
    }
    
    .wp-heatmap-cookie-banner {
        border-top: 2px solid #fff;
    }
    
    .wp-heatmap-heatmap-point {
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wp-heatmap-heatmap-point {
        transition: none;
    }
    
    .wp-heatmap-loading .spinner {
        animation: none;
    }
    
    .wp-heatmap-modal .button {
        transition: none;
    }
    
    .wp-heatmap-cookie-banner .button {
        transition: none;
    }
}
