/* MH Modelworks Inspired Styling */

/* Import Google Fonts similar to the original site */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Root Variables - MH Modelworks Color Scheme */
:root {
    --primary-color: #000000;
    --secondary-color: #333333;
    --accent-color: #666666;
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --danger-color: #F44336;
    --light-gray: #f7f7f7;
    --medium-gray: #e1e1e1;
    --dark-gray: #999999;
    --text-primary: #000000;
    --text-secondary: #666666;
    --text-muted: #999999;
    --background-color: #ffffff;
    --card-background: #ffffff;
    --border-color: #e1e1e1;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 2px 8px rgba(0, 0, 0, 0.15);
    --border-radius: 0px;
    --border-radius-large: 0px;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    font-weight: 400;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-container {
    min-height: 100vh;
    padding: 40px 0;
}

/* Header/Navigation Styling */
.site-header {
    background: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    padding: 30px 0;
    margin-bottom: 40px;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--primary-color);
    text-decoration: none;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.site-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 8px 0 0 0;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Card Styling */
.card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-large);
    box-shadow: none;
    margin-bottom: 30px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.card:hover {
    border-color: var(--medium-gray);
}

.card-header {
    background: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    padding: 25px 30px 20px;
    margin: 0;
}

.card-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.card-body {
    padding: 30px;
}

.card-text {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Form Styling */
.form-label {
    color: var(--text-primary);
    font-weight: 400;
    margin-bottom: 8px;
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
    background: var(--background-color);
    color: var(--text-primary);
    margin-bottom: 20px;
    width: 100%;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 5px;
}

.form-check {
    margin: 15px 0;
}

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

.form-check-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Button Styling */
.btn {
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 400;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid;
    cursor: pointer;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.btn-success:hover {
    background-color: #45a049;
    border-color: #45a049;
    color: white;
}

.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Alert Styling */
.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border: 1px solid transparent;
    font-size: 0.9rem;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-dismissible {
    position: relative;
    padding-right: 50px;
}

.btn-close {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.6;
}

.btn-close:hover {
    opacity: 1;
}

/* 3D Viewer Styling */
#stl-viewer {
    width: 100%;
    height: 400px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: #f8f9fa;
    margin-bottom: 15px;
}

/* Loading/Waiting Page Styling */
.text-center {
    text-align: center;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border: 0.3em solid var(--medium-gray);
    border-right-color: var(--primary-color);
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Logo and Branding */
.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container img {
    max-height: 120px;
    width: auto;
}

.logo-placeholder {
    background: var(--light-gray);
    padding: 30px;
    border-radius: var(--border-radius);
    display: inline-block;
    border: 1px solid var(--border-color);
}

.logo-placeholder h3 {
    color: var(--text-primary);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 400;
}

.logo-placeholder p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Product Slideshow */
.product-slideshow {
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: 120px; /* Same height as logo max-height */
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--light-gray);
    z-index: 2;
    min-height: 120px; /* Ensure minimum height */
}

.slide {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
    z-index: 1;
}

.slide:first-child {
    opacity: 1; /* Ensure first slide is visible by default */
}

.slide.active {
    opacity: 1 !important;
    pointer-events: auto;
    z-index: 2;
}

.slide img {
    width: 100%;
    height: 120px; /* Match container height exactly */
    object-fit: contain; /* Scale to fit within bounds while maintaining aspect ratio */
    object-position: center;
    display: block;
    background: var(--light-gray); /* Background for letterboxing if needed */
}

.slideshow-dots {
    text-align: center;
    margin-top: 15px;
}

.dot {
    cursor: pointer;
    height: 8px;
    width: 8px;
    margin: 0 3px;
    background-color: var(--medium-gray);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.dot:hover,
.dot.active {
    background-color: var(--primary-color);
}

/* Responsive adjustments for slideshow */
@media (max-width: 768px) {
    .slideshow-container {
        height: 100px;
    }
    
    .slide img {
        height: 100px; /* Match mobile container height */
    }
    
    .dot {
        height: 6px;
        width: 6px;
        margin: 0 2px;
    }
}

/* Status and Info Styling */
.status-info {
    background: var(--light-gray);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.session-id {
    font-family: 'Courier New', monospace;
    background: var(--medium-gray);
    padding: 4px 8px;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    color: var(--text-primary);
}

/* List Styling */
.list-unstyled {
    list-style: none;
    padding: 0;
}

.list-unstyled li {
    padding: 8px 0;
    color: var(--text-secondary);
}

.list-unstyled li:before {
    content: "✓";
    color: var(--success-color);
    font-weight: bold;
    margin-right: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .main-container {
        padding: 20px 0;
    }
    
    .card-header, .card-body {
        padding: 20px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .card-header, .card-body {
        padding: 15px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.25rem; }
}

/* Utility Classes */
.text-muted {
    color: var(--text-muted) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

.d-flex { display: flex !important; }
.gap-2 { gap: 0.5rem !important; }
.justify-content-center { justify-content: center !important; }
.align-items-center { align-items: center !important; }

.img-fluid {
    max-width: 100%;
    height: auto;
}

/* Custom animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Focus states for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .btn, .alert, .spinner-border {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}