/*
 * File: main.css
 * Desc: Global styles and layout
 */

/* Orig colors
 */
:root {
    --primary-color: #2563eb;
    --primary-light: #3b82f6;
    --secondary-color: #f8fafc;
    --accent-color: #10b981;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --strong-purple: purple;
    --primary-purple: #8B7EC8;
    --primary-green: #7FB069;
    --purple-light: #B8A9DB;
    --purple-xlight: #EAD2F7;
    --green-light: #A3D982;
    --purple-dark: #6B5B95;
    --green-dark: #5F8A3A;
    --white: #ffffff;
    --bglogo: lavender;
    --gray-light: #f8f9fa;
    --gray-medium: #e9ecef;
    --gray-dark: #495057;
    --text-dark: #212529;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --font-size: 24px;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --sidebar-width: 250px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Orig fonts
    font-family: 'Open Sans', Roboto, Ubuntu, Oxygen, Cantarell, sans-serif;
    background-color: var(--gray-light);
    color: var(--text-dark);

    font-family: 'Open Sans', Roboto, Ubuntu, Oxygen, Cantarell, sans-serif;
 */
body {
    font-family: 'Open Sans', Roboto, Ubuntu, Oxygen, Cantarell, sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-primary);
    line-height: 1.6;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

.main-container {
    display: flex;
    flex: 1;
    position: relative;
    min-height: 0; /* Allow flex child to shrink below content height for overflow */
}

.content-area {
    flex: 1;
    padding: 20px;
    background: var(--white);
    margin-left: var(--sidebar-width);
    transition: var(--transition);
    overflow-y: auto;
    min-height: 0; /* Allow flex child to shrink below content height for overflow */
}

/* Responsive Design - Laptop */
@media (max-width: 1200px) {
    :root {
        --sidebar-width: 220px;
    }

    .content-area {
        padding: 16px;
    }
}

/* Responsive Design - Tablet */
@media (max-width: 1024px) {
    .content-area {
        margin-left: 0;
        padding: 15px;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .content-area {
        margin-left: 0;
        padding: 10px;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: var(--font-size);
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-green));
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--gray-medium);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: var(--gray-dark);
    color: var(--white);
}

.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5em;
    color: var(--text-dark);
}

h1 {
    font-size: 2.5rem;
    font-weight: 300;
}

h2 {
    font-size: 2rem;
    font-weight: 400;
}

h3 {
    font-size: 1.5rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }
}

/* Short viewport height — reduce excessive vertical padding on laptop screens (768px height).
   No Shadow DOM means these global selectors reach all components. */
@media (max-height: 800px) {
    /* 60px padding states → 24px */
    .empty-state,
    .loading-state,
    .generating-animation,
    .video-placeholder,
    .planning-loading,
    .planning-empty,
    .sys-admin-loading,
    .sys-admin-empty,
    .sys-admin-error,
    .notifications-loading,
    .notifications-error {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    /* 40px padding states → 16px */
    .suggestions-empty,
    .dashboard-error,
    .notifications-empty,
    .processing,
    .genie-card {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    /* Large empty-state icons — reduce from 48-64px */
    .empty-icon,
    .planning-empty-icon,
    .placeholder-icon,
    .error-icon {
        font-size: 36px;
        margin-bottom: 12px;
    }
}
