/* ============================================
   UTILITIES - Layout, Typography, Helpers
   Extracted from components.css for reuse
   ============================================ */

/* ============================================
   PAGE LAYOUT STANDARD
   ============================================

   RULE: Components should NOT have their own
   white backgrounds or box-shadows. The page
   wrapper handles all card styling.

   Structure:
   - .page-container-wide  → max-width 1200px, centered
   - .card-white           → white card with shadow (USE THIS)
   - Component renders     → transparent, no extra box

   ============================================ */

/* Visibility helpers */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.flex {
    display: flex !important;
}

/* Layout */
.page-container-wide {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-3xl, 40px);
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-column-gap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.layout-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

.cursor-pointer {
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg, 20px);
    margin-bottom: var(--spacing-4xl, 50px);
}

.card-grid-sm {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.card-grid-md {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.container-narrow {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
}

.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Spacing */
.section-spacing-sm { margin-bottom: var(--spacing-md, 10px); }
.section-spacing-md { margin-bottom: var(--spacing-2xl, 30px); }
.section-spacing-lg { margin-bottom: var(--spacing-3xl, 40px); }
.section-spacing-xl { margin-bottom: var(--spacing-4xl, 50px); }
.mb-md { margin-bottom: 15px; }
.mb-lg { margin-bottom: 20px; }
.mb-xl { margin-bottom: 30px; }

/* Typography */
.text-muted { color: var(--color-text-secondary, #7f8c8d); }
.text-muted-light { color: var(--color-text-muted, #bdc3c7); }
.text-secondary { color: var(--color-text-secondary, #555); }
.text-gray { color: #666; }
.text-description {
    color: var(--color-text-secondary, #7f8c8d);
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.5;
}
.text-meta-sm {
    color: var(--color-text-secondary, #7f8c8d);
    margin: 0;
    font-size: 0.95rem;
}
.text-compact {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-primary, #2c3e50);
    line-height: 1.5;
}
.text-white-muted {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    margin-top: 5px;
}
.text-secondary { color: var(--color-text-secondary, #555); }
.text-meta-weight { color: var(--color-text-secondary, #7f8c8d); font-weight: 500; }
.text-meta-center { color: var(--color-text-secondary, #7f8c8d); text-align: center; }
.text-heading-lg {
    color: var(--color-text-primary, #2c3e50);
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md, 10px);
}
.text-subtitle {
    color: var(--color-text-secondary, #7f8c8d);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg, 20px);
}
.text-label {
    margin-bottom: var(--spacing-md, 10px);
    color: var(--color-text-primary, #2c3e50);
}
.text-dark { color: var(--color-text-primary, #2c3e50); }
.text-success { color: var(--color-success, #2ecc71); }
.text-center { text-align: center; }
.text-success-bold { color: var(--color-success, #2ecc71); font-weight: 600; }
.text-primary-bold { color: var(--color-primary, #3498db); font-weight: 600; }
.text-error-bold { color: var(--color-error, #e74c3c); font-weight: 600; }
.text-opacity-sm { font-size: 0.9rem; opacity: 0.9; margin-bottom: 8px; }
.text-opacity-xs { font-size: 0.85rem; opacity: 0.8; margin-top: 10px; }

.heading-lg { font-size: 1.8rem; margin-bottom: 15px; }
.heading-xl { font-size: 2.2rem; font-weight: 700; }
.heading-card {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--color-text-primary, #2c3e50);
    margin-bottom: 8px;
}
.section-header {
    color: var(--color-text-primary, #2c3e50);
    margin-bottom: var(--spacing-xl, 25px);
    margin-top: var(--spacing-3xl, 40px);
}
.section-header-sm {
    color: var(--color-text-primary, #2c3e50);
    margin: 0 0 var(--spacing-md, 10px) 0;
}
.section-header-lg {
    color: var(--color-text-primary, #2c3e50);
    margin-bottom: 30px;
}
.section-header-emphasis {
    color: var(--color-text-primary, #2c3e50);
    margin-bottom: 25px;
    font-size: 1.3rem;
}
.section-header-xl {
    color: var(--color-text-primary, #2c3e50);
    margin: 0 0 15px 0;
}
.section-header-hero {
    color: var(--color-text-primary, #2c3e50);
    margin: 0 0 10px 0;
    font-size: 1.8rem;
}
.section-header-icon {
    color: var(--color-text-primary, #2c3e50);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title-lg {
    color: var(--color-text-primary, #2c3e50);
    margin: 0 0 25px 0;
    font-size: 1.5rem;
}
.section-title-base {
    color: var(--color-text-primary, #2c3e50);
    margin: 0 0 15px 0;
    font-size: 1rem;
}

/* Icon sizes */
.icon-lg { font-size: 3rem; margin-bottom: var(--spacing-md, 15px); }
.icon-xl { font-size: 2.5rem; margin-bottom: var(--spacing-md, 15px); }
.icon-xl-tight { font-size: 2.5rem; margin-bottom: 10px; }

/* Font helpers */
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

/* Cards */
.card-white {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.card-white-sm {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.card-muted {
    background: var(--color-bg-light, #f8f9fa);
    padding: 40px;
    border-radius: 12px;
}
.card-muted-sm {
    background: var(--color-bg-light, #f8f9fa);
    padding: 20px;
    border-radius: 10px;
}
.card-hero {
    margin-bottom: 50px;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}
.card-accent-primary {
    background: white;
    padding: 25px;
    border-radius: 10px;
    border-top: 4px solid var(--color-primary, #3498db);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.card-accent-success {
    background: white;
    padding: 25px;
    border-radius: 10px;
    border-top: 4px solid var(--color-success, #2ecc71);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.sidebar-card {
    background: var(--color-bg-light, #f8f9fa);
    padding: 20px;
    border-radius: 12px;
    height: fit-content;
}

/* Stats */
.stat-inline {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    font-weight: 600;
}
.stat-inline--primary { color: var(--color-primary, #3498db); }
.stat-inline--error { color: var(--color-error, #e74c3c); }
.stat-inline--success { color: var(--color-success, #2ecc71); }
.stat-inline--purple {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--color-purple, #9b59b6);
    font-weight: 600;
}

/* Buttons */
.btn-action-success {
    width: 100%;
    padding: 10px;
    background: var(--color-success, #2ecc71);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}
.btn-action-primary {
    width: 100%;
    padding: 10px;
    background: var(--color-primary, #3498db);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}
.btn-action-purple {
    width: 100%;
    padding: 10px;
    background: var(--color-purple, #9b59b6);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}
.btn-action-warning {
    width: 100%;
    padding: 10px;
    background: var(--color-warning, #f39c12);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}
.btn-submit-full {
    width: 100%;
    margin-top: 30px;
    padding: 15px;
    font-size: 1.1rem;
}
.btn-secondary-full {
    width: 100%;
    margin-top: 20px;
    background: #e0e0e0;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    color: var(--color-text-primary, #2c3e50);
}

/* Decorative and misc */
.decorative-line {
    height: 3px;
    width: 60px;
    background: linear-gradient(90deg, var(--color-primary, #3498db), var(--color-success, #2ecc71));
    border-radius: 2px;
}
.price-success {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--color-success, #2ecc71);
}
.list-secondary {
    color: #555;
    margin: 0;
    padding-left: 20px;
    line-height: 1.8;
}
.list-item-separator {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-border, #ecf0f1);
}
.empty-state-center {
    text-align: center;
    padding: 40px;
    color: var(--color-text-muted, #95a5a6);
}
.text-right-muted {
    text-align: right;
    color: var(--color-text-muted, #95a5a6);
    font-size: 0.85rem;
}
.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
