/**
 * Public Device Page Styles
 */

:root {
    --dp-public-primary: #0073aa;
    --dp-public-accent: #00d4ff;
    --dp-public-bg: #ffffff;
    --dp-public-text: #1a1a1a;
    --dp-public-border: #e0e0e0;
    --dp-public-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --dp-public-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
}

.dp-public-page-container {
    width: 100%;
    background: #f5f5f5;
}

.dp-public-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
}

/* Header/Hero */
.dp-public-page-header {
    background: linear-gradient(135deg, var(--dp-public-primary) 0%, var(--dp-public-accent) 100%);
    color: white;
    padding: 80px 40px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.dp-header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.05;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="white" stroke-width="1"/></svg>');
    background-size: 200px 200px;
}

.dp-header-content {
    position: relative;
    z-index: 1;
}

.dp-header-title {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: white;
    line-height: 1.2;
}

.dp-header-subtitle {
    font-size: 20px;
    margin: 0 0 30px 0;
    opacity: 0.95;
}

.dp-header-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.dp-meta-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.dp-meta-date {
    font-size: 14px;
    opacity: 0.9;
}

/* Main Content */
.dp-public-page-main {
    padding: 60px 40px;
}

/* Sections */
section {
    margin-bottom: 60px;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Device Info Card */
.dp-device-info-card {
    background: #f9f9f9;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--dp-public-border);
}

.dp-card-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 30px 0;
    color: var(--dp-public-text);
    padding-bottom: 15px;
    border-bottom: 3px solid var(--dp-public-accent);
}

.dp-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.dp-card-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid var(--dp-public-primary);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dp-card-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dp-card-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--dp-public-text);
}

.dp-monospace {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

/* Service Report */
.dp-service-report {
    background: white;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--dp-public-border);
}

.dp-report-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 30px 0;
    color: var(--dp-public-text);
    padding-bottom: 15px;
    border-bottom: 3px solid var(--dp-public-accent);
}

.dp-service-timeline {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.dp-service-item {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid var(--dp-public-primary);
}

.dp-service-header {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.dp-service-date {
    font-size: 14px;
    font-weight: 600;
    color: var(--dp-public-primary);
}

.dp-service-tech {
    font-size: 13px;
    color: #666;
}

.dp-service-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    background: #e0e0e0;
    color: #333;
}

.dp-status-completed {
    background: #d4edda;
    color: #155724;
}

.dp-status-pending {
    background: #fff3cd;
    color: #856404;
}

.dp-status-failed {
    background: #f8d7da;
    color: #721c24;
}

/* Before/After */
.dp-service-before-after {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: start;
    margin-bottom: 20px;
}

.dp-service-photo-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dp-photo-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--dp-public-text);
    margin: 0;
}

.dp-service-photo {
    width: 100%;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: var(--dp-public-shadow);
}

.dp-no-photo {
    width: 100%;
    height: 200px;
    background: #e0e0e0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

.dp-service-divider {
    width: 2px;
    background: var(--dp-public-border);
}

.dp-service-description,
.dp-service-work {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.dp-description-label,
.dp-work-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--dp-public-primary);
    text-transform: uppercase;
    margin: 0 0 10px 0;
    letter-spacing: 0.5px;
}

.dp-service-description p,
.dp-service-work p {
    margin: 0;
    line-height: 1.6;
    color: #555;
}

/* Photo Gallery */
.dp-photo-gallery {
    background: white;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--dp-public-border);
}

.dp-gallery-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 30px 0;
    color: var(--dp-public-text);
    padding-bottom: 15px;
    border-bottom: 3px solid var(--dp-public-accent);
}

.dp-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.dp-gallery-item {
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dp-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--dp-public-shadow-lg);
}

.dp-gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.dp-gallery-caption {
    padding: 10px;
    font-size: 13px;
    color: #666;
    margin: 0;
}

.dp-gallery-date {
    display: block;
    padding: 5px 10px;
    font-size: 12px;
    color: #999;
}

/* QR Section */
.dp-qr-section {
    background: white;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--dp-public-border);
    text-align: center;
}

.dp-qr-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 30px 0;
    color: var(--dp-public-text);
    padding-bottom: 15px;
    border-bottom: 3px solid var(--dp-public-accent);
}

.dp-qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.dp-qr-code {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--dp-public-border);
}

.dp-qr-code svg,
.dp-qr-code img {
    width: 250px;
    height: 250px;
}

.dp-qr-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.dp-qr-button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dp-qr-view {
    background: var(--dp-public-primary);
    color: white;
}

.dp-qr-view:hover {
    background: #005a87;
}

.dp-qr-print {
    background: #e0e0e0;
    color: var(--dp-public-text);
}

.dp-qr-print:hover {
    background: #d0d0d0;
}

/* Documents Section */
.dp-documents-section {
    background: white;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--dp-public-border);
}

.dp-docs-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 30px 0;
    color: var(--dp-public-text);
    padding-bottom: 15px;
    border-bottom: 3px solid var(--dp-public-accent);
}

.dp-documents-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dp-document-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 4px solid var(--dp-public-primary);
    transition: all 0.3s ease;
}

.dp-document-item:hover {
    background: #f0f0f0;
    box-shadow: var(--dp-public-shadow);
}

.dp-doc-icon {
    font-size: 24px;
}

.dp-doc-info {
    flex: 1;
}

.dp-doc-name {
    margin: 0 0 5px 0;
    font-size: 15px;
    font-weight: 600;
}

.dp-doc-name a {
    color: var(--dp-public-primary);
    text-decoration: none;
}

.dp-doc-name a:hover {
    text-decoration: underline;
}

.dp-doc-date {
    font-size: 12px;
    color: #999;
}

.dp-doc-download {
    padding: 8px 12px;
    background: var(--dp-public-accent);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.dp-doc-download:hover {
    background: #0099cc;
}

/* Footer */
.dp-public-page-footer {
    background: #f9f9f9;
    padding: 40px;
    border-top: 1px solid var(--dp-public-border);
    text-align: center;
}

.dp-footer-content {
    color: #666;
    font-size: 13px;
}

.dp-footer-copyright,
.dp-footer-device,
.dp-footer-generated {
    margin: 5px 0;
}

/* Status Badges */
.dp-status-active {
    background: #d4edda;
    color: #155724;
}

.dp-status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.dp-status-archived {
    background: #e2e3e5;
    color: #383d41;
}

.dp-status-pending {
    background: #fff3cd;
    color: #856404;
}

/* Print Styles */
@media print {
    .dp-public-page-container {
        background: white;
    }

    .dp-public-page-wrapper {
        max-width: 100%;
        box-shadow: none;
    }

    section {
        page-break-inside: avoid;
        margin-bottom: 30px;
    }

    .dp-service-before-after {
        grid-template-columns: 1fr 1fr;
    }

    .dp-service-divider {
        display: none;
    }

    .dp-qr-actions,
    .dp-doc-download {
        display: none;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --dp-public-bg: #1a1a1a;
        --dp-public-text: #f0f0f0;
        --dp-public-border: #444;
    }

    .dp-public-page-wrapper {
        background: #2d2d2d;
    }

    .dp-device-info-card,
    .dp-service-report,
    .dp-photo-gallery,
    .dp-qr-section,
    .dp-documents-section {
        background: #2d2d2d;
    }

    .dp-card-item,
    .dp-service-item,
    .dp-service-description,
    .dp-service-work,
    .dp-gallery-item,
    .dp-document-item {
        background: #1f1f1f;
    }

    .dp-qr-code,
    .dp-gallery-item {
        background: #1f1f1f;
    }

    .dp-public-page-footer {
        background: #1f1f1f;
    }
}
