/* ==========================================================================
   Test Tag Page Styles
   ========================================================================== */

.test-tag-section {
    min-height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 140px 24px 80px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.test-tag-container {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.target-card-wrapper,
.apriltag-card-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 32px 0 28px 0;
}

.target-card,
.apriltag-card {
    background: #FFFFFF;
    border-radius: var(--radius-md);
    padding: 24px 28px;
    box-shadow: 0 0 40px rgba(255, 85, 0, 0.2), 0 20px 50px rgba(0, 0, 0, 0.7);
    border: 2px solid var(--color-orange);
    max-width: 340px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: var(--transition-smooth);
}

.target-card-header,
.apriltag-card-header {
    margin-bottom: 14px;
}

.scaler-badge {
    background: rgba(255, 85, 0, 0.08);
    color: #FF5500;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.76rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 2px;
    border: 1px solid rgba(255, 85, 0, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.08em;
    position: relative;
}

.scaler-badge::before,
.scaler-badge::after {
    content: "";
    position: absolute;
    width: 4px;
    height: 4px;
    border-color: var(--color-orange);
    border-style: solid;
}
.scaler-badge::before {
    top: -1px;
    left: -1px;
    border-width: 1.5px 0 0 1.5px;
}
.scaler-badge::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 1.5px 1.5px 0;
}

:root {
    --target-border-size: 50mm;
}

.target-stage-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    padding: calc(var(--target-border-size) / 8); /* Exactly 1 quiet cell on all sides (8:10 ratio) */
    border-radius: var(--radius-xs);
    box-sizing: content-box;
}

.target-black-border {
    width: var(--target-border-size);
    height: var(--target-border-size);
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
}

.target-grid-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

.target-details,
.apriltag-details {
    margin-top: 14px;
    text-align: center;
}

.target-tag-id,
.apriltag-tag-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0A0C10;
    letter-spacing: 0.03em;
}

.target-tag-sub,
.apriltag-tag-sub {
    font-size: 0.8rem;
    color: #64748B;
    margin-top: 3px;
    font-family: 'JetBrains Mono', monospace;
}

/* Instant Scan Cue Callout */
.scan-cue-banner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 85, 0, 0.08);
    border: 1px dashed rgba(255, 85, 0, 0.4);
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    font-size: 0.88rem;
    color: var(--text-primary);
    margin-top: 18px;
    max-width: 480px;
}

.scan-cue-banner strong {
    color: var(--color-orange);
}

/* Test Target Display Scale Disclaimer Box */
.test-disclaimer-box {
    display: inline-flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 85, 0, 0.08);
    border: 1px solid rgba(255, 85, 0, 0.35);
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    margin-top: 14px;
    max-width: 540px;
    text-align: left;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.disclaimer-content {
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.5;
}

.test-disclaimer-box .disclaimer-icon {
    width: 20px;
    height: 20px;
    color: var(--color-orange-bright);
    flex-shrink: 0;
    margin-top: 2px;
}

.test-disclaimer-box strong {
    color: var(--text-primary);
}

.test-disclaimer-box a {
    color: var(--color-orange-bright);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
}

.test-disclaimer-box a:hover {
    color: #FFFFFF;
}

.test-tag-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 20px;
    width: 100%;
}

/* BIM Model Guide & Custom Generator Cards */
.test-guide-card {
    margin-top: 36px;
    width: 100%;
    background: rgba(18, 24, 32, 0.7);
    border: 1px solid var(--border-rugged);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    text-align: left;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.test-guide-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.test-guide-icon {
    width: 20px;
    height: 20px;
    color: var(--color-orange);
    flex-shrink: 0;
}

.test-guide-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.test-step-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.test-step-number {
    width: 22px;
    height: 22px;
    background: rgba(255, 85, 0, 0.12);
    border: 1px solid rgba(255, 85, 0, 0.4);
    border-radius: 50%;
    color: var(--color-orange);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.test-step-row strong {
    color: #FFFFFF;
}

.test-step-row code {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-orange);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
}

/* Custom Generator Banner Card */
.test-generator-banner {
    margin-top: 24px;
    width: 100%;
    background: rgba(22, 30, 41, 0.6);
    border: 1px solid var(--border-rugged);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.test-generator-banner h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 6px;
}

.test-generator-banner p {
    font-size: 0.88rem;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 16px auto;
    line-height: 1.5;
}


/* Print Styles for AprilTag test target page */
@media print {
    body.test-page * {
        visibility: hidden;
    }
    body.test-page .grid-overlay, 
    body.test-page header, 
    body.test-page footer, 
    body.test-page .site-footer, 
    body.test-page .hero-ctas, 
    body.test-page .test-tag-actions, 
    body.test-page .badge, 
    body.test-page .section-subtitle, 
    body.test-page .section-title,
    body.test-page .scan-cue-banner,
    body.test-page .test-disclaimer-box,
    body.test-page .test-guide-card,
    body.test-page .test-generator-banner {
        display: none !important;
    }
    body.test-page .test-tag-section, 
    body.test-page .test-tag-container, 
    body.test-page .target-card-wrapper,
    body.test-page .apriltag-card-wrapper, 
    body.test-page .target-card,
    body.test-page .apriltag-card, 
    body.test-page .target-stage-wrap,
    body.test-page .target-black-border,
    body.test-page .target-grid-img,
    body.test-page .apriltag-image, 
    body.test-page .target-card *,
    body.test-page .apriltag-card * {
        visibility: visible;
    }
    body.test-page .test-tag-section {
        padding: 0 !important;
        min-height: auto !important;
        display: block !important;
    }
    body.test-page .target-card,
    body.test-page .apriltag-card {
        border: none !important;
        box-shadow: none !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 auto !important;
    }
    body.test-page .target-stage-wrap {
        padding: 6.25mm !important;
        margin: 20mm auto 0 auto !important;
    }
    body.test-page .target-black-border {
        width: 50mm !important;
        height: 50mm !important;
    }
    body.test-page .target-grid-img,
    body.test-page .apriltag-image {
        width: 50mm !important;
        height: 50mm !important;
        object-fit: contain !important;
        display: block !important;
    }
}

