/* Homepage-specific CSS for the new React-based homepage */
/* Extracted from homepage.md and adapted for Flask integration */

/* Custom styles for range sliders */
.slider::-webkit-slider-thumb {
    appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #4F46E5;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.slider::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #4F46E5;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Homepage container - isolate styling from Bootstrap */
.react-homepage {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(180deg, #FBF9F8 0%, #FDFBFA 100%);
    min-height: 100vh;
    padding-top: 0;
}

/* Design token CSS variables for easy management */
.react-homepage {
    --ui-bg-gradient: linear-gradient(180deg, #FBF9F8 0%, #FDFBFA 100%);
    --ui-card: #FBFAF8;
    --ui-card-alt: #FAF9F8;
    --ui-app-surface: #F9F7F5;
    --ui-chip-bg: #FCFAF9;
    --ui-light-well: #FDFCFA;
    --ui-border: #F8F7F5;
    --ui-text-primary: #78562B;
    --ui-text-secondary: #977F62;
    --ui-control-track: #F9F7F5;
    --ui-control-fill: #977F62;
    --ui-btn-default: #B1A397;
    --ui-btn-hover: #977F62;
    --ui-viewer-bg: #FDFCFA;
    --ui-dashed: #C8A88B;
}

/* Responsive Tailwind prefix configuration */
.react-homepage .tw-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Typography adjustments for homepage */
.react-homepage main h1,
.react-homepage main h2,
.react-homepage main h3,
.react-homepage main h4,
.react-homepage main h5,
.react-homepage main h6 {
    color: var(--ui-text-primary);
}

.react-homepage main p,
.react-homepage main span,
.react-homepage main div {
    color: var(--ui-text-primary);
}

/* Button and interaction styles */
.react-homepage button:focus {
    outline: 2px solid var(--ui-control-fill);
    outline-offset: 2px;
}

.react-homepage input:focus,
.react-homepage textarea:focus,
.react-homepage select:focus {
    outline: 2px solid var(--ui-control-fill);
    outline-offset: 2px;
}

/* Ensure proper z-index for dropdowns and modals */
.react-homepage .dropdown-suggestions {
    z-index: 1000;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .react-homepage .hero-title {
        font-size: 2.5rem !important;
    }
    
    .react-homepage .hero-subtitle {
        font-size: 1.25rem !important;
    }
    
    .react-homepage .grid-responsive-single {
        grid-template-columns: 1fr !important;
    }
}

/* Ensure Tailwind classes work properly with prefixing */
.react-homepage .tw-grid {
    display: grid;
}

.react-homepage .tw-grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.react-homepage .tw-grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.react-homepage .tw-grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.react-homepage .tw-grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.react-homepage .tw-gap-2 {
    gap: 0.5rem;
}

.react-homepage .tw-gap-3 {
    gap: 0.75rem;
}

.react-homepage .tw-gap-4 {
    gap: 1rem;
}

/* Scroll behavior for smooth navigation */
.react-homepage {
    scroll-behavior: smooth;
}

/* Loading states */
.react-homepage .loading-overlay {
    background: rgba(253, 252, 250, 0.9);
    backdrop-filter: blur(4px);
}

/* Animation for stone addition */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.react-homepage .stone-added {
    animation: slideIn 0.3s ease-out;
}

/* Enhanced card styling for parameter modules */
.react-homepage .parameter-card {
    background: var(--ui-light-well);
    border: 2px solid var(--ui-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(120, 86, 43, 0.06);
    transition: box-shadow 0.2s ease;
}

.react-homepage .parameter-card:hover {
    box-shadow: 0 4px 12px rgba(120, 86, 43, 0.1);
}

/* Button styling improvements */
.react-homepage .action-button {
    background: var(--ui-btn-default);
    color: white;
    border: 1px solid var(--ui-border);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.react-homepage .action-button:hover {
    background: var(--ui-btn-hover);
    transform: translateY(-1px);
}

/* Section headers */
.react-homepage .section-header {
    color: var(--ui-text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Specifications header styling */
.react-homepage .specifications-header {
    color: var(--ui-text-primary);
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 1rem;
    text-align: center;
}