
/*
Theme Name: BI Viewer Pro
Theme URI: https://bivista.co.uk
Author: BI Viewer Pro Team
Author URI: https://bivista.co.uk
Description: Headless WordPress theme for BI Viewer Pro React application with advanced subscription management and multi-tenant support
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bi-viewer-pro
Tags: business, analytics, react, headless, custom-colors, custom-menu, featured-images
*/

/**
 * Base styles - React will handle most styling
 * This file contains only essential WordPress-specific styles
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #F5F7FA;
    overflow-x: hidden;
}

#root {
    min-height: 100vh;
}

/* WordPress admin bar compatibility */
body.admin-bar {
    padding-top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar {
        padding-top: 46px;
    }
}

/* Accessibility */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* WordPress alignment classes */
.alignleft {
    float: left;
    margin-right: 1.5em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
}

.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Ensure React app takes full height */
html, body, #root {
    height: 100%;
}

/* Hide WordPress elements that might interfere */
.wp-block-post-content {
    display: none;
}

/* Loading state styles */
.bi-viewer-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #122C5E 0%, #0066CC 100%);
}

.bi-viewer-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Print styles */
@media print {
    body.admin-bar {
        padding-top: 0;
    }
    
    #wpadminbar {
        display: none;
    }
}

/* RTL Support */
body.rtl {
    direction: rtl;
    text-align: right;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    body {
        background-color: #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}