/* Modern Theme Styles */

:root {
    --modern-bg: #111827;
    --modern-card: #1f2937;
    --modern-border: #374151;
    --modern-text: #f9fafb;
    --modern-text-secondary: #d1d5db;
    --modern-primary: #3b82f6;
    --modern-primary-hover: #2563eb;
}

/* CRITICAL: Footer always at bottom - must be loaded last */
html {
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

html body {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--modern-bg);
    color: var(--modern-text);
}

/* Header should not grow */
html body > nav,
html body > header {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

html body > main {
    flex: 1 1 auto !important;
    flex-grow: 1 !important;
    flex-shrink: 1 !important;
    flex-basis: auto !important;
    background: var(--modern-bg);
    padding-bottom: 2rem;
    min-height: 0 !important;
}

/* Footer always at bottom - CRITICAL */
html body > footer {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    flex-basis: auto !important;
    margin-top: auto !important;
    width: 100% !important;
    order: 999 !important;
}

/* Cards */
.theme-card {
    background: var(--modern-card);
    border: 1px solid var(--modern-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Buttons */
.theme-button {
    background: var(--modern-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.theme-button:hover {
    background: var(--modern-primary-hover);
}

/* Account Pages */
.account-page {
    padding: 2rem 0;
}

/* Override min-h-screen to work with flexbox footer */
.min-h-screen {
    min-height: auto !important;
}

/* Ensure body structure for sticky footer */
body > * {
    flex-shrink: 0;
}

body > main {
    flex: 1 0 auto !important;
}

body > footer {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

.account-card {
    background: var(--modern-card);
    border: 1px solid var(--modern-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.account-card h1,
.account-card h2 {
    color: var(--modern-text);
    margin-bottom: 1rem;
}

.account-card p {
    color: var(--modern-text-secondary);
}

/* Forms */
.theme-input {
    background: var(--modern-card);
    border: 1px solid var(--modern-border);
    color: var(--modern-text);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    width: 100%;
}

.theme-input:focus {
    outline: none;
    border-color: var(--modern-primary);
    ring: 2px;
    ring-color: var(--modern-primary);
}

/* Tables */
.theme-table {
    width: 100%;
    border-collapse: collapse;
}

.theme-table th,
.theme-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--modern-border);
    color: var(--modern-text);
}

.theme-table th {
    background: var(--modern-card);
    font-weight: 600;
    color: var(--modern-text);
}

.theme-table tr:hover {
    background: rgba(59, 130, 246, 0.1);
}

/* Prose adjustments */
.prose i {
    margin-right: 0.25rem;
}

.prose {
    color: var(--modern-text-secondary);
}

.prose h1, .prose h2, .prose h3 {
    color: var(--modern-text);
}

/* Footer styles */
footer {
    background: var(--modern-card) !important;
    border-top: 1px solid var(--modern-border) !important;
    color: var(--modern-text-secondary) !important;
}

footer a {
    color: var(--modern-text-secondary) !important;
}

footer a:hover {
    color: var(--modern-text) !important;
}

/* Text color fixes for better contrast */
.text-gray-400,
.text-gray-300,
.text-gray-500 {
    color: var(--modern-text-secondary) !important;
}

.text-gray-600,
.text-gray-700 {
    color: var(--modern-text) !important;
}

/* Ensure white text on dark backgrounds is visible */
.bg-gray-800 .text-white,
.bg-gray-900 .text-white,
.bg-gray-800 h1,
.bg-gray-900 h1,
.bg-gray-800 h2,
.bg-gray-900 h2 {
    color: var(--modern-text) !important;
}

/* Additional contrast improvements */
.bg-gradient-to-r {
    color: white !important;
}

.bg-gradient-to-r p,
.bg-gradient-to-r span {
    color: white !important;
}

/* Links in cards */
.account-card a {
    color: var(--modern-primary) !important;
}

.account-card a:hover {
    color: var(--modern-primary-hover) !important;
}

/* Ensure text in gradient boxes is readable */
.bg-gradient-to-r.text-white,
.bg-gradient-to-r .text-white,
.bg-gradient-to-r p,
.bg-gradient-to-r span,
.bg-gradient-to-r div {
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}


