/* public/css/image-generator.css */

/* Base Layout */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.min-h-screen {
    min-height: 80vh; /* Changed from 100vh to accommodate header and footer */
}

.h-full {
    height: 100%;
}

.w-full {
    width: 100%;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-y-auto {
    overflow-y: auto;
}

/* Colors */
.bg-dark {
    background-color: #121212;
}

.bg-sidebar {
    background-color: #1e1e1e;
}

/* Sidebar Specific Styling */
.sidebar {
    width: 360px;
    height: auto; /* Changed from fixed height */
    position: relative; /* Changed from fixed */
    min-height: 80vh; /* Adjust based on content needs */
    border-right: 1px solid #333;
    background-color: #1e1e1e;
    overflow-y: auto;
    z-index: 10;
    padding: 1.5rem;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Main Content Area */
.main-content {
    width: calc(100% - 360px);
    min-height: 80vh; /* Adjust to match sidebar */
    padding: 1.5rem;
    background-color: #121212;
}

/* Form Elements Styling */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    background-color: #2a2a2a;
    border: 1px solid #374151;
    border-radius: 0.375rem;
    color: white;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* Button Styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-secondary {
    background-color: #333;
    color: white;
}

.btn-secondary:hover {
    background-color: #444;
}

.btn-small {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

/* Range Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    width: 100%;
    background: #4B5563;
    border-radius: 3px;
    outline: none;
    margin: 0.5rem 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #3B82F6;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #3B82F6;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

/* Number Input Styling */
input[type="number"] {
    width: 4rem;
    text-align: center;
    padding: 0.35rem;
    background-color: #333;
    border: 1px solid #4a5568;
    border-radius: 0.25rem;
    color: white;
}

/* Remove number input arrows */
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;
}

/* Preset Buttons */
.preset-buttons {
    display: flex;
    gap: 0.5rem;
}

.preset-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.15s;
}

.preset-btn:hover {
    background-color: #444;
}

.preset-btn.active, .preset-btn.selected {
    background-color: #3B82F6;
    color: white;
}

/* Progress Bars */
.progress-container {
    background-color: #2A2A2A;
    border-radius: 9999px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-bar {
    height: 0.5rem;
    transition: width 0.3s ease;
    min-width: 0%;
    border-radius: 9999px;
}

.progress-bar-green {
    background-color: #10B981;
}

.progress-bar-blue {
    background-color: #3B82F6;
}

.progress-bar-large {
    height: 0.75rem;
}

/* Card Styling */
.card {
    background-color: #1A1A1A;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #f3f4f6;
}

/* Image Styling */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    width: 100%;
}

.image-grid img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.image-grid img:hover {
    transform: scale(1.02);
}

/* Aspect Ratio Button Styling */
.aspect-ratio-btn {
    position: relative;
    padding-left: 2rem;
    padding-right: 2rem;
}

.aspect-ratio-btn.selected {
    background-color: #3B82F6;
    border-color: #3B82F6;
}

/* Empty State Styling */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #9CA3AF;
}

.empty-state p {
    margin-bottom: 0.5rem;
}

/* Generated Image Section */
.generated-image-section {
    width: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Responsive Styling */
@media (max-width: 1024px) {
    .sidebar {
        width: 320px;
    }

    .main-content {
        width: calc(100% - 320px);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 280px;
    }

    .main-content {
        width: calc(100% - 280px);
    }
    
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 640px) {
    .flex {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid #333;
    }

    .main-content {
        width: 100%;
    }

    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .preset-buttons {
        width: 100%;
        justify-content: space-between;
    }
}

/* Animations */
@keyframes progress-pulse {
    0% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.8;
    }
}

.animating {
    animation: progress-pulse 2s infinite;
}

/* Make content area work with header */
main .flex {
    margin-top: 20px;
}