/**
 * Ohio Energy Advisor - Custom Styles
 * Supplements Tailwind CSS for specific customizations
 */

/* Custom color variables (matching Tailwind config) */
:root {
    --primary: #1e293b;
    --primary-dark: #0f172a;
    --energy-green: #059669;
    --energy-green-dark: #047857;
    --accent: #f97316;
}

/* ===== LAYOUT & CONTAINER CONSTRAINTS ===== */
/* Constrain container width for professional look on large screens */
.container {
    max-width: 1280px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive padding for breathing room */
@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (min-width: 1280px) {
    .container {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}

@media (min-width: 1536px) {
    .container {
        max-width: 1400px;
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

/* Prevent horizontal overflow from edge-to-edge sections */
section {
    overflow-x: hidden;
}

/* Ensure body doesn't have horizontal scroll */
body {
    overflow-x: hidden;
}

/* ===== SMOOTH SCROLL ===== */
html {
    scroll-behavior: smooth;
}

/* ===== PROFESSIONAL FORM STYLING ===== */
/* Custom focus styles for accessibility */
*:focus-visible {
    outline: 2px solid var(--energy-green);
    outline-offset: 2px;
}

/* Form input focus states */
input:focus,
select:focus,
textarea:focus {
    border-color: var(--energy-green);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Ensure form inputs have minimum height for touch targets */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
select,
textarea {
    min-height: 44px;
}

/* ===== PROFESSIONAL CARD STYLING ===== */
/* Subtle shadow refinement for cards */
.shadow-lg {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07),
                0 2px 4px -2px rgba(0, 0, 0, 0.05),
                0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

/* Rounded corners consistency */
.rounded-xl {
    border-radius: 0.875rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

/* Button hover transitions */
button,
.btn,
a.btn {
    transition: all 0.2s ease-in-out;
}

/* Card hover effects */
.card-hover {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Loading spinner animation */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Fade in animation for results */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Quiz step transitions */
.quiz-step {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Progress bar animation */
.progress-bar {
    transition: width 0.5s ease-in-out;
}

/* Chart container responsive sizing */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

@media (max-width: 640px) {
    .chart-container {
        height: 250px;
    }
}

/* File upload drag-over state */
.upload-area-active {
    border-color: var(--energy-green);
    background-color: rgba(34, 197, 94, 0.05);
}

/* Mobile navigation */
@media (max-width: 768px) {
    .mobile-menu {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

    .mobile-menu.open {
        transform: translateX(0);
    }
}

/* Table responsive styles */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Tooltip styles */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: var(--primary);
    color: white;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Number input spinner hide (for cleaner design) */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}
