/* ===========================================
   BIM CHECKER - IDS VALIDATOR STYLES
   Styles specific to IDS-IFC Validator
   =========================================== */

/* Upload Section */
.upload-section {
    background: #f8f9fa;
    padding: 40px;
    border-bottom: 2px solid #e9ecef;
}

.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

.upload-box {
    border: 3px dashed #667eea;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-box:hover {
    border-color: #764ba2;
    background: #f8f9ff;
}

.upload-box.has-files {
    border-color: #28a745;
    border-style: solid;
}

.upload-icon {
    font-size: 3em;
    color: #667eea;
    margin-bottom: 15px;
}

.upload-box.has-files .upload-icon {
    color: #28a745;
}

.upload-box h3 {
    font-size: 1.2em;
    color: #495057;
    margin-bottom: 10px;
}

.upload-box p {
    color: #6c757d;
    font-size: 0.9em;
}

.file-input {
    display: none;
}

.file-list {
    margin-top: 15px;
    text-align: left;
}

.file-item {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
}

.file-item-name {
    color: #495057;
    font-weight: 600;
}

.file-remove {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.85em;
}

.file-remove:hover {
    background: #c82333;
}

.validate-button-container {
    text-align: center;
    padding-top: 20px;
}

/* Validation Groups */
.validation-group {
    background: white;
    border: 3px solid #667eea;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    position: relative;
    transition: all 0.3s ease;
}

.validation-group:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.group-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #2d3748;
}

.group-delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.group-delete-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.group-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.group-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 2px solid #e9ecef;
}

.group-section h4 {
    margin: 0 0 15px 0;
    color: #4a5568;
    font-size: 1.1em;
}

.storage-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.05em;
    font-weight: 600;
    transition: all 0.3s;
    margin-bottom: 15px;
}

.storage-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Drop Zone Styles */
.drop-zone {
    margin-top: 15px;
    padding: 30px;
    border: 3px dashed #cbd5e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.drop-zone:hover {
    border-color: #667eea;
    background: #f7fafc;
}

.drop-zone.drag-over {
    border-color: #667eea;
    background: #eef2ff;
    box-shadow: 0 0 12px rgba(102, 126, 234, 0.3);
    transform: scale(1.02);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.drop-zone-icon {
    font-size: 2.5em;
}

.drop-zone-text {
    font-size: 1.1em;
    color: #4a5568;
    font-weight: 600;
}

.drop-zone-hint {
    font-size: 0.9em;
    color: #a0aec0;
}

.selected-files-list {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 10px;
}

.selected-file-item {
    background: white;
    padding: 10px;
    margin: 5px 0;
    border-radius: 6px;
    border: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}

.selected-file-item .file-icon {
    font-size: 1.2em;
}

.selected-file-item .file-name {
    flex: 1;
    font-weight: 500;
    color: #2d3748;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    display: none;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Results Section */
.results-section {
    padding: 40px;
    display: none;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.stat-card.pass {
    border-color: #28a745;
}

.stat-card.fail {
    border-color: #dc3545;
}

.stat-card.warning {
    border-color: #ffc107;
}

.stat-number {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card.pass .stat-number {
    color: #28a745;
}

.stat-card.fail .stat-number {
    color: #dc3545;
}

.stat-card.warning .stat-number {
    color: #ffc107;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filters */
.filters-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 2px solid #e9ecef;
}

.filters-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 15px;
    align-items: center;
}

.filter-input {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
}

.filter-input:focus {
    outline: none;
    border-color: #667eea;
}

/* Specification Results */
.specification-result {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.specification-result.collapsed .spec-details {
    display: none;
}

.specification-result.pass {
    border-color: #28a745;
}

.specification-result.fail {
    border-color: #dc3545;
}

.spec-header {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.spec-header:hover {
    background: #e9ecef;
}

.spec-title {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.expand-icon {
    transition: transform 0.3s;
    font-size: 1.2em;
    color: #6c757d;
}

.specification-result.collapsed .expand-icon {
    transform: rotate(-90deg);
}

.spec-name {
    font-size: 1.2em;
    font-weight: 600;
    color: #2d3748;
}

.spec-status-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
}

.spec-status-badge.pass {
    background: #d4edda;
    color: #155724;
}

.spec-status-badge.fail {
    background: #f8d7da;
    color: #721c24;
}

.spec-stats {
    display: flex;
    gap: 20px;
    font-size: 0.9em;
    color: #6c757d;
}

.spec-details {
    padding: 20px;
    border-top: 2px solid #e9ecef;
}

/* Entity Results */
.entity-result {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #e9ecef;
}

.entity-result.pass {
    border-left-color: #28a745;
}

.entity-result.fail {
    border-left-color: #dc3545;
}

.entity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.entity-info {
    flex: 1;
}

.entity-type {
    font-weight: 600;
    color: #667eea;
    font-size: 0.95em;
}

.entity-name {
    color: #495057;
    font-size: 0.9em;
    margin-top: 3px;
}

.entity-guid {
    font-family: 'Courier New', monospace;
    color: #6c757d;
    font-size: 0.85em;
    margin-top: 3px;
}

.entity-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
}

.entity-status.pass {
    background: #d4edda;
    color: #155724;
}

.entity-status.fail {
    background: #f8d7da;
    color: #721c24;
}

.validation-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #dee2e6;
}

.validation-item {
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 0.9em;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.validation-item.pass {
    background: #d4edda;
}

.validation-item.fail {
    background: #f8d7da;
}

.validation-icon {
    font-size: 1.1em;
    min-width: 20px;
}

.validation-message {
    flex: 1;
}

.validation-label {
    font-weight: 600;
    margin-bottom: 2px;
}

.validation-value {
    color: #6c757d;
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 768px) {
    .upload-grid {
        grid-template-columns: 1fr;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .results-stats {
        grid-template-columns: 1fr;
    }
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
