/*
 * Global Styles
 * EnchantedOzarks Oracle Collective Platform
 * Copyright (c) 2025 Tammy L Casey. All rights reserved.
 */

/* CSS variables are defined in base.html */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main, 'Inter', sans-serif);
    line-height: 1.6;
    color: var(--dark, #1e1b4b);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading, 'Space Grotesk', sans-serif);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary, #6366f1);
    transition: all 0.2s;
}

a:hover {
    color: var(--primary-dark, #4f46e5);
}

/* Utility Classes */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius, 0.5rem);
    padding: 1.5rem;
    box-shadow: var(--shadow, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
    transition: all 0.3s;
}

.card:hover {
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius, 0.5rem);
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-main);
}

.btn-primary {
    background: var(--primary, #6366f1);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark, #4f46e5);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--primary, #6366f1);
    border: 2px solid var(--primary, #6366f1);
}

.btn-secondary:hover {
    background: var(--primary, #6366f1);
    color: white;
}

.btn-success {
    background: var(--success, #10b981);
    color: white;
}

.btn-success:hover {
    background: #059669;
    color: white;
}

.btn-danger {
    background: var(--danger, #ef4444);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    color: white;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border, #e2e8f0);
    border-radius: var(--radius, 0.5rem);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.95);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark, #1e1b4b);
}

/* Grid System */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Flex Utilities */
.flex {
    display: flex;
}

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

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

.flex-wrap {
    flex-wrap: wrap;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--primary, #6366f1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius, 0.5rem);
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background: #d1fae5;
    border-color: var(--success, #10b981);
    color: #065f46;
}

.alert-warning {
    background: #fef3c7;
    border-color: var(--warning, #f59e0b);
    color: #92400e;
}

.alert-danger {
    background: #fee2e2;
    border-color: var(--danger, #ef4444);
    color: #991b1b;
}

.alert-info {
    background: #dbeafe;
    border-color: var(--primary, #6366f1);
    color: #1e40af;
}

/* Responsive */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 1rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}
