/* Custom styles for InfraViz application */

/* Global styles */
body {
    background-color: #f8f9fa;
    color: #343a40;
    font-family: 'Roboto', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1;
}

/* Header styles */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    color: #0d6efd !important;
}

/* Card styles */
.card {
    background-color: #ffffff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 20px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.card-title {
    color: #0d6efd;
}

.card-img-top {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    height: 200px;
    object-fit: cover;
}

/* Form styles */
.form-control, .form-select {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    color: #343a40;
}

.form-control:focus, .form-select:focus {
    background-color: #ffffff;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    color: #212529;
}

.form-label {
    color: #495057;
    font-weight: 500;
}

/* Button styles */
.btn-primary {
    background-color: #0d6efd;
    border: none;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #0b5ed7;
}

.btn-outline-light {
    border-color: #0d6efd;
    color: #0d6efd;
}

.btn-outline-light:hover {
    background-color: #0d6efd;
    color: #ffffff;
}

/* White text buttons for dark backgrounds */
.bg-dark .btn-outline-light {
    border-color: #ffffff;
    color: #ffffff;
}

.bg-dark .btn-outline-light:hover {
    background-color: #ffffff;
    color: #0d6efd;
}

/* Footer styles */
footer {
    margin-top: auto;
    background-color: #f8f9fa;
    padding: 20px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

/* Image upload and preview */
.image-preview-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.image-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    display: none; /* Hidden initially */
}

.upload-label {
    display: block;
    padding: 40px 20px;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-label:hover {
    background-color: #e9ecef;
    border-color: #0d6efd;
}

.upload-label i {
    font-size: 48px;
    color: #0d6efd;
    margin-bottom: 10px;
    display: block;
}

.upload-icon {
    display: block;
}

/* Project view styles */
.before-after-container {
    display: flex;
    flex-direction: column;
}

.before-after-images {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.image-container {
    flex: 1;
    min-width: 300px;
}

.image-container img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.image-caption {
    text-align: center;
    margin-top: 10px;
    color: #495057;
    font-weight: 500;
}

/* Dashboard styles */
.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    color: #0d6efd;
}

/* Loading overlay */
.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: none;
}

.processing-spinner {
    width: 80px;
    height: 80px;
    border: 8px solid #333;
    border-top: 8px solid #4fc3f7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.processing-text {
    color: #fff;
    font-size: 24px;
    font-weight: 500;
}

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

/* Improvements list */
.improvements-list {
    list-style-type: none;
    padding-left: 0;
}

.improvements-list li {
    background-color: #e9f3ff;
    padding: 8px 15px;
    margin-bottom: 8px;
    border-radius: 20px;
    display: inline-block;
    margin-right: 8px;
    color: #212529;
    border: 1px solid #0d6efd;
}

.improvements-list li i {
    color: #0d6efd;
    margin-right: 5px;
}

/* Home page styles */
.hero-section {
    padding: 80px 0;
    background-color: #e9f3ff;
    border-radius: 12px;
    margin-bottom: 50px;
}

.hero-section h1 {
    font-size: 2.75rem;
    font-weight: 700;
    color: #0d6efd;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-section p.lead {
    font-size: 1.2rem;
    color: #495057;
    margin-bottom: 30px;
}

.highlight-box {
    background-color: rgba(13, 110, 253, 0.1);
    border-radius: 8px;
    border-left: 4px solid #0d6efd;
    color: #495057;
}

.highlight-box i {
    font-size: 1.2rem;
    color: #0d6efd;
}

.before-after-showcase {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
}

.before-after-showcase .card {
    margin-bottom: 0;
    transform: none;
    box-shadow: none;
}

.before-after-showcase .card:hover {
    transform: none;
}

.before-after-showcase .card-header {
    text-align: center;
    font-weight: 600;
    padding: 8px;
    background-color: #0d6efd;
    color: white;
}

.features-section {
    margin-bottom: 50px;
}

.bg-dark-subtle {
    background-color: #f0f8ff;
}

.feature-card {
    text-align: center;
    padding: 30px 20px;
    height: 100%;
}

.feature-card h3 {
    color: #0d6efd;
    margin: 15px 0;
}

.feature-icon {
    font-size: 48px;
    color: #0d6efd;
    margin-bottom: 20px;
}

.benefits-section h4 {
    color: #212529;
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.benefits-section .card {
    transition: transform 0.3s;
}

.benefits-section .card:hover {
    transform: translateY(-5px);
}

/* Login and register forms */
.auth-container {
    max-width: 500px;
    margin: 50px auto;
}

/* Flash messages */
.alert {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Improvement select styling */
.improvement-select {
    height: auto !important;
    min-height: 120px;
}

/* Checkbox improvements container */
.improvement-checkbox-container {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px 15px;
    max-height: 200px;
    overflow-y: auto;
}

.improvement-checkbox-container .form-check {
    margin-bottom: 8px;
}

.improvement-checkbox-container .form-check-input {
    margin-right: 8px;
}

.improvement-checkbox-container .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.improvement-checkbox-container .form-check-label {
    cursor: pointer;
    color: #495057;
}

/* Style description styling */
#styleDescription {
    padding: 10px;
    margin-top: 10px;
    background-color: #f0f8ff;
    border-left: 4px solid #0d6efd;
    border-radius: 4px;
    font-style: italic;
    color: #495057;
    transition: all 0.3s ease;
}

#styleDescription:empty {
    display: none;
}

select#style option:hover {
    background-color: #0d6efd;
    color: #ffffff;
}

/* Output style badge styling */
.output-style-badge {
    display: inline-flex;
    align-items: center;
    background-color: rgba(13, 110, 253, 0.1);
    border-radius: 4px;
    padding: 3px 8px;
    margin-left: 5px;
    color: #495057;
}

.style-info {
    color: #0d6efd;
    margin-left: 8px;
    cursor: help;
    transition: color 0.2s;
}

.style-info:hover {
    color: #0b5ed7;
}

/* Modal styles */
.modal-content.bg-dark {
    color: #ffffff;
}

.modal-content.bg-dark .modal-body {
    color: #ffffff;
}

/* Homepage showcase images */
.showcase-image {
    height: 250px;
    object-fit: cover;
    background-color: #f5f5f5;
    object-position: center center;
}

/* Force consistent image display in cards */
.card-body .row.g-0 {
    min-height: 250px;
}

.card-body .row.g-0 .col-6 {
    height: 250px;
}

.card-body .row.g-0 .col-6 img {
    height: 250px !important;
    display: block;
}

/* Ensure consistent heights for Before and After images */
.card-body img[alt="Before"],
.card-body img[alt^="After"] {
    height: 250px !important;
}

/* Version notes styling */
.version-notes {
    margin-top: 8px;
}

.notes-form {
    margin-bottom: 0;
}

.notes-textarea {
    font-size: 0.85rem;
    resize: vertical;
    background-color: #f8fafc;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.notes-textarea:focus {
    background-color: #fff;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.1rem rgba(13, 110, 253, 0.2);
}

.notes-textarea::placeholder {
    color: #adb5bd;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .hero-section h1 {
        font-size: 2.2rem;
    }
    
    .before-after-images {
        flex-direction: column;
    }
}
