/* static/css/civil/concrete-slab-master-calculator.css */

/* Slab Visualization Styles */
.slab-visualization-container {
    height: 400px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0d6efd;
    margin-bottom: 5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

/* Design Recommendations */
.design-recommendations {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 15px;
    border-left: 4px solid #0dcaf0;
}

.tips-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tip-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #495057;
}

.tip-item i {
    margin-right: 10px;
    font-size: 1.1rem;
}

/* Calculator Tabs */
.calculator-tabs .nav-pills .nav-link {
    padding: 12px 16px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.calculator-tabs .nav-pills .nav-link.active {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.calculator-tabs .nav-pills .nav-link:not(.active) {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.calculator-tabs .nav-pills .nav-link:not(.active):hover {
    background: #e9ecef;
    color: #495057;
}

/* Chart Containers */
.chart-container {
    height: 250px;
    position: relative;
}

/* Advanced Options */
.advanced-options {
    transition: all 0.3s ease;
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
}

.advanced-toggle {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.advanced-toggle:hover {
    color: #0b5ed7 !important;
}

.advanced-content {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}

.advanced-content.show {
    max-height: 600px;
}

/* Calculation Note */
.calculation-note {
    font-size: 0.85rem;
    color: #6c757d;
    background: linear-gradient(90deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #0d6efd;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    border-radius: 0 8px 8px 0;
}

/* Result Highlight */
.result-highlight {
    background: linear-gradient(135deg, #e7f3ff 0%, #cce7ff 100%);
    padding: 1.25rem;
    border-radius: 12px;
    border-left: 4px solid #0dcaf0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Table Styles */
.table-slabs {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.table-slabs th {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border: none;
    padding: 15px 12px;
}

.table-slabs td {
    padding: 12px;
    border-color: #f1f3f4;
    vertical-align: middle;
}

.table-slabs tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.001);
    transition: all 0.2s ease;
}

/* View Controls */
.view-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 5;
}

.view-control-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-control-btn:hover {
    background: rgba(13, 110, 253, 0.9);
    color: white;
}

.view-control-btn.active {
    background: #0d6efd;
    color: white;
}

/* Material Grade Indicators */
.grade-m15 { color: #dc3545; }
.grade-m20 { color: #fd7e14; }
.grade-m25 { color: #ffc107; }
.grade-m30 { color: #28a745; }
.grade-m35 { color: #20c997; }
.grade-m40 { color: #0dcaf0; }

/* Steel Grade Indicators */
.steel-fe415 { color: #007bff; }
.steel-fe500 { color: #6f42c1; }
.steel-fe550 { color: #e83e8c; }

/* Export Specific Styles */
.export-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.export-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

/* Loading Animation for 3D Visualization */
.loading-3d {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    flex-direction: column;
    color: #6c757d;
}

.loading-3d .spinner-border {
    margin-bottom: 15px;
}

/* Custom Scrollbar for Advanced Options */
.advanced-content::-webkit-scrollbar {
    width: 4px;
}

.advanced-content::-webkit-scrollbar-track {
    background: #f1f3f4;
}

.advanced-content::-webkit-scrollbar-thumb {
    background: #0d6efd;
    border-radius: 2px;
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* 3D Visualization Enhancements */
.slab-3d-controls {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.control-button {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.control-button:hover {
    background: rgba(13, 110, 253, 0.9);
    color: white;
    transform: translateX(2px);
}

.control-button.active {
    background: #0d6efd;
    color: white;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

/* Responsive Design Improvements */
@media (max-width: 768px) {
    .chart-container {
        height: 200px;
    }
    
    .slab-visualization-container {
        height: 250px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
    
    .advanced-content.show {
        max-height: 800px;
    }
    
    .calculator-tabs .nav-pills {
        flex-direction: column;
    }
    
    .calculator-tabs .nav-pills .nav-link {
        margin-bottom: 5px;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .slab-visualization-container {
        height: 200px;
    }
    
    .result-highlight {
        padding: 1rem;
    }
    
    .btn-group .btn {
        font-size: 0.8rem;
        padding: 0.375rem 0.5rem;
    }
    
    .table-slabs {
        font-size: 0.85rem;
    }
    
    .table-slabs th,
    .table-slabs td {
        padding: 8px 6px;
    }
}

/* Calculator Input Sections */
.calculator-inputs {
    transition: all 0.3s ease;
}

/* Input Group Styles */
.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    outline: none;
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-safe {
    background-color: #d1e7dd;
    color: #0f5132;
}

.status-warning {
    background-color: #fff3cd;
    color: #664d03;
}

.status-danger {
    background-color: #f8d7da;
    color: #842029;
}

/* Tab Content Animation */
.tab-content {
    position: relative;
}

.tab-pane {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Range Input */
input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #dee2e6;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0d6efd;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0d6efd;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Custom Checkbox */
.form-check-input {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    user-select: none;
}

/* Tooltip Styles */
.tooltip-icon {
    display: inline-block;
    margin-left: 5px;
    color: #6c757d;
    cursor: help;
}

.tooltip-icon:hover {
    color: #0d6efd;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    .btn-group,
    .export-section,
    .advanced-toggle {
        display: none !important;
    }
    
    .slab-visualization-container {
        height: 250px;
        page-break-inside: avoid;
    }
    
    .result-highlight {
        background: none;
        border: 1px solid #dee2e6;
    }
    
    .table-slabs {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

/* Add these styles to your CSS file */
.zoom-controls {
    margin-top: 10px;
}

.zoom-controls .btn-group {
    margin-top: 5px;
}

.zoom-indicator {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    color: #333;
    z-index: 10;
    pointer-events: none;
}

/* Responsive adjustments for zoom controls */
@media (max-width: 768px) {
    .zoom-controls .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .zoom-controls .btn i {
        margin-right: 0.25rem;
    }
}

/* Animation for zoom notifications */
.zoom-notification {
    animation: zoomFadeIn 0.3s ease-out;
}

@keyframes zoomFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Hover effects for zoom buttons */
.btn-zoom:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

.btn-zoom:active {
    transform: scale(0.95);
}