/**
 * Equipment Data Display Styles
 */

.equipment-data-display {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.equipment-data-display h2 {
    color: #333;
    margin-bottom: 30px;
}

.equipment-data-display h3 {
    color: #555;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.equipment-data-display h4.subsection-title {
    color: #666;
    font-size: 1.1em;
    margin-top: 20px;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
}

.equipment-data-display h4.subsection-title:first-of-type {
    margin-top: 0;
}

/* Data Sections */
.data-section {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #555;
}

.form-group input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group input:invalid {
    border-color: #dc3545;
}

.error-msg {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    min-height: 18px;
}

/* Autocomplete */
.autocomplete-group {
    position: relative;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.suggestion-item:hover {
    background-color: #f0f8ff;
}

/* Duplicate Warning */
.duplicate-warning {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.duplicate-warning h4 {
    margin-top: 0;
    color: #856404;
}

.duplicate-warning p {
    color: #856404;
    margin: 10px 0;
}

.duplicate-item {
    background-color: #fff;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
}

.duplicate-item strong {
    display: block;
    margin-bottom: 5px;
}

.duplicate-item span {
    color: #666;
    font-size: 14px;
}

.duplicate-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

/* Messages */
.message-section {
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
}

.message-section.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.message-section.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.message-section.info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #000;
}

.modal-content h3 {
    margin-top: 0;
    color: #333;
}

/* History Items */
.history-item {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.history-item h4 {
    margin-top: 0;
    color: #007bff;
}

.history-item p {
    margin: 5px 0;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .equipment-data-display {
        padding: 10px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .duplicate-actions {
        flex-direction: column;
    }

    .modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
    }
}
