/**
 * HappyAI Theme Styles
 * 
 * This file contains the base styles for the WordPress theme.
 * The React app will handle most of the styling, but we need
 * some basic styles for the loading state and theme structure.
 */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #FAFAFA;
}

/* Site container - Full screen for HappyAI app */
#page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Header - Hidden for HappyAI app */
.site-header {
    display: none !important;
}

.site-branding {
    max-width: 1200px;
    margin: 0 auto;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    text-decoration: none;
    color: #3A2A6A;
}

/* Main content - Full screen */
#happyai-app {
    flex: 1;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Ensure React app container is full width */
#happyai-app > * {
    width: 100%;
    max-width: 100%;
}

/* Loading state */
.happyai-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(169, 140, 255, 0.2);
    border-top-color: #A98CFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.happyai-loading p {
    margin-top: 1rem;
    color: #5C5571;
    font-size: 1rem;
}

/* Footer - Hidden for HappyAI app */
.site-footer {
    display: none !important;
}

.site-info {
    max-width: 1200px;
    margin: 0 auto;
    color: #8F86AF;
    font-size: 0.875rem;
}

/* Mobile-first responsive */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Responsive breakpoints */
@media (max-width: 768px) {
    #happyai-app {
        width: 100vw;
        max-width: 100vw;
    }
}

/* Prevent horizontal scroll */
* {
    max-width: 100%;
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

