/* HID Customer Service Log - Frontend Styles */

.hid-service-log-wrapper {
    max-width: 1200px;
    margin: 0;
    padding: 0;
}

.hid-service-log-header {
    margin-bottom: 30px;
}

.hid-service-log-header h2 {
    margin-bottom: 15px;
    color: #333;
}

.hid-service-log-tabs {
    border-bottom: 2px solid #eee;
    margin-bottom: 30px;
}

.hid-service-log-tabs a {
    display: inline-block;
    padding: 12px 20px;
    margin-right: 10px;
    text-decoration: none;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.hid-service-log-tabs a:hover {
    color: #333;
    border-bottom-color: #ccc;
}

.hid-service-log-tabs a.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
    font-weight: 600;
}

/* Equipment List Styles */
.hid-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
}

.hid-empty-state h3 {
    margin-bottom: 15px;
    color: #555;
}

.hid-empty-state p {
    color: #777;
    margin-bottom: 25px;
}

.hid-equipment-actions {
    margin-bottom: 25px;
}

.hid-equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.hid-equipment-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.hid-equipment-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.equipment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.equipment-header h4 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

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

.status-badge.due-soon {
    background: #fff3cd;
    color: #856404;
}

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

.equipment-details p {
    margin: 8px 0;
    font-size: 14px;
    color: #555;
}

.equipment-details strong {
    color: #333;
}

.equipment-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.equipment-actions .button {
    flex: 1;
    text-align: center;
}

/* Service History Styles */
.hid-service-history {
    margin-top: 30px;
}

.service-timeline {
    position: relative;
    padding-left: 30px;
}

.service-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ddd;
}

.service-entry {
    position: relative;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    margin-left: 15px;
}

.service-entry::before {
    content: '';
    position: absolute;
    left: -23px;
    top: 20px;
    width: 12px;
    height: 12px;
    background: #0073aa;
    border-radius: 50%;
    border: 3px solid #fff;
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.service-date {
    font-weight: 600;
    color: #0073aa;
}

.service-hours {
    color: #666;
    font-size: 14px;
}

.service-work {
    margin-bottom: 15px;
}

.service-work h5 {
    margin: 0 0 8px 0;
    color: #333;
}

.service-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    font-size: 14px;
}

.service-detail {
    color: #555;
}

.service-detail strong {
    color: #333;
}

/* Modal Styles */
.hid-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

.modal-content .close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.modal-content .close:hover,
.modal-content .close:focus {
    color: #333;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
}

.form-row {
    margin-bottom: 20px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-col {
    display: flex;
    gap: 15px;
}

.form-col > div {
    flex: 1;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-row input,
.form-row textarea,
.form-row select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
}

.form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hid-equipment-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .equipment-actions {
        flex-direction: column;
    }
    
    .form-col {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 2% auto;
        padding: 20px;
        width: 95%;
        max-height: 90vh;
    }
    
    .service-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Notices */
.hid-notice {
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 4px;
    border-left: 4px solid;
}

.hid-notice.success {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.hid-notice.error {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.hid-notice.warning {
    background: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}