/*
Theme Name: Printer Test Theme
Author: Joshua Nimako
Description: A clean, user-friendly theme for printer testing
Version: 2.0
*/

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Enhanced Print Color Support */
body { 
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

#printertestpagelogo {
    max-height: 80px;
    max-width: 80px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.header h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
    flex: 1;
    text-align: right;
    min-width: 200px;
}

/* Main Content Container */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 1rem;
}

/* Content Section */
.content {
    background: white;
    margin: 2rem auto;
    padding: 3rem 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    max-width: 900px;
}

.content h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.content > p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #555;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* Button Container */
.buttons {
    margin: 2.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Enhanced Button Styles */
button {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    min-width: 280px;
    text-transform: none;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 123, 255, 0.4);
}

button:active {
    transform: translateY(0);
    transition: transform 0.1s;
}

/* Specific Button Colors */
#PrintBlackandWhitePage {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

#PrintBlackandWhitePage:hover {
    box-shadow: 0 6px 25px rgba(108, 117, 125, 0.4);
}

#PrintColorpage {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

#PrintColorpage:hover {
    box-shadow: 0 6px 25px rgba(23, 162, 184, 0.4);
}

#CMYK {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 25%, #48dbfb 50%, #ff9ff3 75%, #54a0ff 100%);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    background-size: 200% 200%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

#CMYK:hover {
    box-shadow: 0 6px 25px rgba(255, 107, 107, 0.4);
}

/* CMYK Source Text */
.CYMKSOURCE {
    font-size: 1rem;
    color: #666;
    margin-top: 1rem;
    font-style: italic;
}

.CYMKSOURCE a {
    color: #007bff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.CYMKSOURCE a:hover {
    border-bottom-color: #007bff;
}

/* Color Instructions - Simple Always-Visible Version */
.color-instructions-simple {
    margin: 1.5rem auto;
    max-width: 600px;
}

.instruction-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #f1f8e9 100%);
    border: 2px solid #17a2b8;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    text-align: center;
}

.instruction-box h4 {
    color: #17a2b8;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.instruction-box p {
    margin: 0.5rem 0;
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.4;
}

.instruction-box small {
    color: #6c757d;
    font-style: italic;
}

/* Color Instructions - Compact Version */
.color-instructions {
    margin: 1.5rem 0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.instruction-toggle {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.instruction-summary {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1rem;
    list-style: none;
    transition: background 0.3s ease;
    user-select: none;
}

.instruction-summary::-webkit-details-marker {
    display: none;
}

.instruction-summary:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
}

.toggle-icon {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.instruction-toggle[open] .toggle-icon {
    transform: rotate(180deg);
}

.instruction-content {
    padding: 1.5rem;
    background: white;
}

.instruction-content p {
    margin-bottom: 1rem;
    color: #495057;
    font-size: 0.95rem;
}

.instruction-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
    color: #495057;
}

.instruction-content li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.instruction-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.instruction-note strong {
    color: #856404;
}

/* CMYK Instructions - Collapsible Version */
.cmyk-instructions-collapsible {
    margin: 2rem auto;
    max-width: 900px;
}

.cmyk-toggle {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cmyk-summary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    list-style: none;
    transition: background 0.3s ease;
    user-select: none;
}

.cmyk-summary::-webkit-details-marker {
    display: none;
}

.cmyk-summary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

.cmyk-toggle[open] .toggle-icon {
    transform: rotate(180deg);
}

.cmyk-content {
    padding: 2rem;
    background: white;
}

.instruction-subtitle {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.cmyk-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cmyk-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.cmyk-step .step-number {
    background: #28a745;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.cmyk-step .step-content {
    flex: 1;
}

.cmyk-step .step-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.cmyk-step .step-description {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.cmyk-content .highlight {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
}

.cmyk-content .highlight strong {
    color: #856404;
}

.cmyk-content .screenshot-placeholder {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
    color: #6c757d;
}

.cmyk-content .screenshot-placeholder img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 1rem 0;
}

.cmyk-content .warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.cmyk-content .warning-box h4 {
    color: #856404;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.cmyk-content .warning-box p {
    color: #856404;
    margin: 0;
    line-height: 1.5;
}

/* Section Divider */
.section-divider {
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
    margin: 3rem 0;
    color: #495057;
    padding: 0 1rem;
}

hr {
    border: none;
    border-top: 1px solid #e9ecef;
    margin: 2rem 0;
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
}

/* Article Content */
.articletext {
    background: white;
    margin: 2rem auto;
    padding: 3rem 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 1000px;
    line-height: 1.7;
}

.articletext h3 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 600;
    color: #2c3e50;
    margin: 2rem 0 1rem 0;
    text-align: center;
}

.articletext h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #343a40;
    margin: 2rem 0 1rem 0;
}

.articletext h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
    margin: 1.5rem 0 0.75rem 0;
}

.articletext p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 1.5rem;
    text-align: left;
}

.articletext ul, .articletext ol {
    margin: 1rem 0 1.5rem 0;
    padding-left: 2rem;
}

.articletext li {
    margin-bottom: 0.5rem;
    color: #555;
}

.articletext li strong {
    color: #2c3e50;
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table th, .table td {
    border: 1px solid #e9ecef;
    padding: 1rem;
    text-align: left;
    vertical-align: top;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.table td {
    font-size: 0.9rem;
    color: #555;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
    padding: 2rem;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer p {
    margin: 0;
    font-size: 1rem;
}

.footer a {
    color: #ffc107;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
        text-align: center;
        flex-direction: column;
    }
    
    .header h1 {
        text-align: center;
        font-size: 1.8rem;
    }
    
    .content {
        margin: 1rem;
        padding: 2rem 1rem;
    }
    
    .content h2 {
        font-size: 1.8rem;
    }
    
    .content > p {
        font-size: 1rem;
    }
    
    button {
        min-width: 250px;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .cmyk-instructions {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .cmyk-instructions-collapsible {
        margin: 1rem;
    }
    
    .cmyk-summary {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .cmyk-content {
        padding: 1.5rem;
    }
    
    .cmyk-step {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.25rem;
    }
    
    .cmyk-step .step-number {
        align-self: center;
    }
    
    .cmyk-step .step-title {
        font-size: 1rem;
    }
    
    .cmyk-step .step-description {
        font-size: 0.9rem;
    }
    
    .color-instructions-simple {
        margin: 1rem;
    }
    
    .instruction-box {
        padding: 1rem;
    }
    
    .instruction-box h4 {
        font-size: 1rem;
    }
    
    .instruction-box p {
        font-size: 0.85rem;
    }
    
    .color-instructions {
        margin: 1rem;
    }
    
    .instruction-summary {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
    
    .instruction-content {
        padding: 1rem;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .step-number {
        align-self: center;
    }
    
    .articletext {
        margin: 1rem;
        padding: 2rem 1rem;
    }
    
    .articletext h3 {
        font-size: 1.5rem;
    }
    
    .articletext h4 {
        font-size: 1.2rem;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table th, .table td {
        padding: 0.75rem 0.5rem;
    }
    
    .footer {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .content {
        padding: 1.5rem 1rem;
    }
    
    .content h2 {
        font-size: 1.5rem;
    }
    
    button {
        min-width: 200px;
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .articletext {
        padding: 1.5rem 1rem;
    }
    
    .articletext h3 {
        font-size: 1.3rem;
    }
    
    .table {
        font-size: 0.8rem;
    }
    
    .table th, .table td {
        padding: 0.5rem 0.25rem;
    }
}

/* Print Styles */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .header, .footer {
        background: #8B4513 !important;
        color: white !important;
    }
    
    button {
        background: #007bff !important;
        color: white !important;
    }
}

/* Focus and Accessibility */
button:focus,
a:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation for better UX */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content,
.cmyk-instructions,
.articletext {
    animation: fadeInUp 0.6s ease-out;
}

/* Color Instructions - Collapsible Version */
.color-instructions {
    margin: 1.5rem auto;
    max-width: 700px;
}

.instruction-toggle {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.instruction-summary {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1rem;
    list-style: none;
    transition: background 0.3s ease;
    user-select: none;
}

.instruction-summary::-webkit-details-marker {
    display: none;
}

.instruction-summary:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
}

.toggle-icon {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.instruction-toggle[open] .toggle-icon {
    transform: rotate(180deg);
}

.instruction-content {
    padding: 1.5rem;
    background: white;
}

.instruction-content p {
    margin-bottom: 1rem;
    color: #495057;
    font-size: 0.95rem;
}

.instruction-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
    color: #495057;
}

.instruction-content li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.instruction-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.instruction-note strong {
    color: #856404;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .color-instructions {
        margin: 1rem;
    }
    
    .instruction-summary {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
    
    .instruction-content {
        padding: 1rem;
    }
    
    .instruction-content li {
        font-size: 0.85rem;
    }
}

/* P1 Monetization Support & Guardrails */
.ptp-no-ad-zone {
    position: relative;
    width: 100%;
    margin-bottom: 2.5rem;
    clear: both;
    z-index: 10; /* Ensure core actions sit above any nearby floated elements */
}

/* Explicit protection for core action areas to prevent ad bleed-in if scripts are aggressive */
.ptp-no-ad-zone > * {
    position: relative;
    z-index: 1;
}

.ptp-ad-safe-zone {
    width: 100%;
    min-height: 20px; /* Minimum footprint to ensure stability if slot is empty */
    margin: 4rem 0;
    clear: both;
    display: block;
    background: transparent; /* Ready for future site-skin specific backgrounds */
}

/* Landmarking for data-zones to help layout stability */
.ptp-ad-safe-zone[data-zone*="support"] {
    margin: 3rem 0;
}

.ptp-ad-safe-zone[data-zone*="diagnostics"] {
    margin: 5rem 0;
}

/* Ensure continuation modules maintain spacing when wrapped */
.ptp-continuation-wrapper {
    margin: 60px 0;
    padding: 40px 0;
    border-top: 1px solid rgba(0,0,0,0.05);
    background: #fdfdfd; /* Subtle visual containment for support areas */
    border-radius: 12px;
}

/* Media query adjustments for monetization zone behavior */
@media (max-width: 768px) {
    .ptp-ad-safe-zone {
        margin: 2.5rem 0;
    }
    .ptp-no-ad-zone {
        margin-bottom: 1.5rem;
    }
    .ptp-continuation-wrapper {
        margin: 40px 0;
        padding: 20px 0;
    }
}