/* Service Public Styles */

.dp-service-public-history {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
}

.dp-service-public-history h2 {
    margin-top: 0;
    color: #0073aa;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.device-info {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.device-info p {
    margin: 8px 0;
}

.service-list-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.service-list-table thead {
    background: #f5f5f5;
}

.service-list-table th {
    padding: 12px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #ddd;
}

.service-list-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.service-list-table tbody tr:hover {
    background: #f9f9f9;
}

.service-date {
    font-weight: bold;
    color: #0073aa;
}

.service-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 12px;
}

.service-status.status-completed {
    background: #d4edda;
    color: #155724;
}

.service-status.status-pending {
    background: #fff8e5;
    color: #856404;
}

.service-status.status-in_progress {
    background: #e7f3ff;
    color: #004085;
}

.service-status.status-failed {
    background: #f8d7da;
    color: #721c24;
}

.warranty-active {
    color: #155724;
    font-weight: bold;
}

.warranty-expired {
    color: #721c24;
    font-weight: bold;
}

.warranty-none {
    color: #666;
}

.view-details {
    color: #0073aa;
    text-decoration: none;
    font-weight: bold;
}

.view-details:hover {
    text-decoration: underline;
}

/* Service Detail Page */

.dp-service-public-detail {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.dp-service-public-detail h1 {
    color: #0073aa;
    margin-top: 0;
}

.service-header {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 30px;
}

.service-header h2 {
    margin: 0 0 10px 0;
    color: #333;
}

.service-dates {
    color: #666;
    margin: 10px 0;
}

.duration {
    color: #999;
    font-size: 12px;
}

.service-status {
    margin: 10px 0;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 3px;
    font-weight: bold;
    color: #fff;
}

.status-badge.status-completed {
    background: #28a745;
}

.status-badge.status-pending {
    background: #ffc107;
}

.status-badge.status-in_progress {
    background: #17a2b8;
}

.status-badge.status-failed {
    background: #dc3545;
}

.service-details {
    margin: 30px 0;
}

.service-details h3 {
    color: #0073aa;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.detail-section {
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border-left: 3px solid #0073aa;
}

.detail-section h4 {
    margin-top: 0;
    color: #333;
}

.detail-section p {
    margin: 10px 0;
    line-height: 1.6;
}

.service-parts {
    margin: 30px 0;
}

.service-parts h3 {
    color: #0073aa;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.parts-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.parts-table thead {
    background: #f5f5f5;
}

.parts-table th,
.parts-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.parts-table tbody tr:hover {
    background: #f9f9f9;
}

.service-warranty {
    background: #d4edda;
    padding: 20px;
    border-radius: 4px;
    margin: 30px 0;
    border-left: 4px solid #155724;
}

.service-warranty h3 {
    color: #155724;
    margin-top: 0;
}

.service-warranty p {
    margin: 10px 0;
    line-height: 1.8;
}

.warranty-active {
    color: #155724;
    font-weight: bold;
}

.warranty-expired {
    color: #721c24;
    font-weight: bold;
}

.warranty-none {
    color: #666;
}

.service-technician {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    border-left: 3px solid #004085;
}

.service-technician p {
    margin: 0;
}

/* Responsive */

@media (max-width: 768px) {
    .service-list-table,
    .service-list-table thead,
    .service-list-table tbody,
    .service-list-table th,
    .service-list-table td,
    .service-list-table tr {
        display: block;
        width: 100%;
    }

    .service-list-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .service-list-table tr {
        margin-bottom: 15px;
    }

    .service-list-table td {
        position: relative;
        padding-left: 50%;
    }

    .service-list-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 6px;
        font-weight: bold;
    }
}

/* -- Public service photo grids -------------------------------- */
.dp-photos-public { margin: 20px 0; }
.dp-photos-public h4 { font-size: 15px; font-weight: 700; margin: 0 0 12px; }
.dp-pub-photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.dp-pub-photo-link {
    display: block;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    transition: border-color .2s, box-shadow .2s;
}
.dp-pub-photo-link:hover { border-color: #2563eb; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.dp-pub-photo-link img {
    display: block;
    width: 160px;
    height: 130px;
    object-fit: cover;
}
@media (max-width: 600px) {
    .dp-pub-photo-link img { width: 120px; height: 100px; }
}
