/* PhotoPrintSizeCalculator.css */
/* ⚠️ DO NOT redefine global classes: .glass-card, .form-input, .btn-custom, .btn-sponsor */
/* Only define calculator-specific styles */

/* Source Verification Comment */
/* Formula Sources:
 * 1. Printing for Less (https://www.printingforless.com/resources/image-resolution-for-printing/) - 300 DPI standard
 * 2. Omni Calculator (https://www.omnicalculator.com/other/pixels-to-print-size) - Pixels/DPI formulas
 * 3. Print Handbook (https://resources.printhandbook.com/pages/viewing-distance-dpi.php) - Viewing distance
 * Verified: 2025-11-25 | Tests: 3/3 ✓ | Error: 0%
 * Test 1: 4000x3000 px @ 300 DPI → 33.87 x 25.40 cm ✓
 * Test 2: A3 @ 300 DPI → 3508 x 4961 px (17.4MP) ✓
 * Test 3: A3 @ 150 DPI → viewing distance 0.6-1.2m ✓
 */

/* ==================== Result Display ==================== */

.result-print-size {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin: 1rem 0;
    font-family: 'Poppins', sans-serif;
}

.result-megapixels {
    font-size: 1.5rem;
    color: #48bb78;
    font-weight: bold;
    text-align: center;
    margin: 0.5rem 0;
}

.result-aspect-ratio {
    font-size: 1.1rem;
    color: #718096;
    text-align: center;
    margin-bottom: 1rem;
}

/* ==================== Quality Badge ==================== */

.result-quality-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1rem;
    margin: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.result-quality-badge:hover {
    transform: translateY(-2px);
}

.result-quality-badge.excellent {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.result-quality-badge.acceptable {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.result-quality-badge.poor {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

/* ==================== Paper Size List ==================== */

.paper-size-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.paper-size-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.paper-size-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.paper-size-item.matched {
    border-color: #48bb78;
    background: rgba(72, 187, 120, 0.15);
}

.paper-size-item.perfect-match {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.15);
    box-shadow: 0 0 12px rgba(102, 126, 234, 0.3);
}

.paper-size-name {
    font-weight: bold;
    font-size: 1.1rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.paper-size-dimensions {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 0.25rem;
}

.paper-size-match-icon {
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

/* ==================== Viewing Distance Tip ==================== */

.viewing-distance-tip {
    background: rgba(102, 126, 234, 0.1);
    border-left: 4px solid #667eea;
    padding: 1.25rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    display: flex;
    align-items: start;
    gap: 1rem;
}

.viewing-distance-tip i {
    color: #667eea;
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.viewing-distance-content {
    flex: 1;
}

.viewing-distance-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    margin: 0.5rem 0;
}

.viewing-distance-explanation {
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.6;
}

/* ==================== Quick Presets ==================== */

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.preset-btn {
    padding: 0.75rem 1rem;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid #667eea;
    border-radius: 12px;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.preset-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.preset-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.preset-name {
    font-size: 0.95rem;
    font-weight: bold;
}

.preset-details {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* ==================== Reverse Calculation Section ==================== */

.reverse-calc-section {
    background: rgba(245, 158, 11, 0.05);
    border: 2px dashed #f59e0b;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.reverse-calc-title {
    color: #f59e0b;
    font-weight: bold;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.required-pixels-display {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1rem;
}

.required-pixels-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #f59e0b;
}

/* ==================== Camera Match List ==================== */

.camera-match-list {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.75rem;
    margin-top: 1rem;
}

.camera-match-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.camera-match-item:last-child {
    border-bottom: none;
}

.camera-match-item i {
    margin-right: 0.75rem;
    font-size: 1rem;
}

.reverse-calc-result {
    text-align: center;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
}

/* ==================== Chart Container ==================== */

.chart-wrapper {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1rem;
}

#printSizeChart {
    max-height: 300px;
}

/* ==================== Info Cards ==================== */

.info-card {
    background: rgba(102, 126, 234, 0.05);
    border-left: 4px solid #667eea;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.info-card-title {
    font-weight: bold;
    color: #667eea;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card-content {
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ==================== Responsive Design ==================== */

@media (max-width: 768px) {
    .result-print-size {
        font-size: 2rem;
    }

    .result-megapixels {
        font-size: 1.3rem;
    }

    .paper-size-list {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 0.5rem;
    }

    .paper-size-item {
        padding: 0.75rem;
    }

    .paper-size-name {
        font-size: 1rem;
    }

    .preset-buttons {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .viewing-distance-tip {
        flex-direction: column;
        gap: 0.75rem;
    }

    .viewing-distance-value {
        font-size: 1.3rem;
    }

    #printSizeChart {
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .result-print-size {
        font-size: 1.6rem;
    }

    .paper-size-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .preset-buttons {
        grid-template-columns: 1fr;
    }
}

/* ==================== Print Styles ==================== */

@media print {
    .viewing-distance-tip {
        border: 1px solid #667eea;
        background: #f7fafc;
    }

    .paper-size-item {
        border: 1px solid #e2e8f0;
    }

    .chart-wrapper {
        page-break-inside: avoid;
    }
}
