/* ProjectorThrowDistanceCalculator.css */
/* 投影機投影距離計算器 - 計算器專用樣式 */
/* 注意：不重新定義全域 CSS classes (.form-input, .btn-custom, .glass-card 等) */

/* ===== Tab Navigation Styling ===== */
.projector-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.projector-tab {
    flex: 1;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.projector-tab:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.projector-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
}

.projector-tab-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 5px;
}

.projector-tab-desc {
    font-size: 0.8rem;
    opacity: 0.8;
}

.projector-tab.active .projector-tab-title,
.projector-tab.active .projector-tab-desc {
    color: white;
}

/* ===== Input Section ===== */
.projector-input-group {
    margin-bottom: 15px;
}

.projector-input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 8px;
}

.projector-input-label i {
    color: #667eea;
}

.projector-input-help {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 5px;
}

.projector-input-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.projector-input-row .form-input {
    flex: 1;
}

/* Custom Ratio Input (shown when "Custom" is selected) */
.projector-custom-input {
    display: none;
    margin-top: 10px;
}

.projector-custom-input.show {
    display: block;
}

/* ===== Results Section ===== */
.projector-result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 25px;
    color: white;
    margin-bottom: 20px;
}

.projector-result-main {
    text-align: center;
    padding: 20px 0;
}

.projector-result-label {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.projector-result-value {
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Roboto Mono', monospace;
}

.projector-result-unit {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.9;
    margin-left: 5px;
}

.projector-result-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    margin: 15px 0;
}

.projector-result-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.projector-result-item {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.projector-result-item-label {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.projector-result-item-value {
    font-size: 1.2rem;
    font-weight: 600;
    font-family: 'Roboto Mono', monospace;
}

/* ===== Room Diagram (Canvas) ===== */
.projector-room-diagram {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.projector-room-diagram canvas {
    width: 100%;
    max-width: 100%;
    height: 250px;
    display: block;
}

/* Fullscreen button in card title */
.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title #btnFullscreen {
    padding: 4px 8px;
    font-size: 0.8rem;
}

/* Note text below diagram */
.projector-diagram-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(102, 126, 234, 0.15);
    border-radius: 6px;
    font-size: 0.85rem;
    color: #a0aec0;
}

.projector-diagram-note i {
    color: #667eea;
}

/* Fullscreen mode styles */
.projector-room-diagram:fullscreen,
.projector-room-diagram:-webkit-full-screen,
.projector-room-diagram:-moz-full-screen,
.projector-room-diagram:-ms-fullscreen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.projector-room-diagram:fullscreen canvas,
.projector-room-diagram:-webkit-full-screen canvas,
.projector-room-diagram:-moz-full-screen canvas,
.projector-room-diagram:-ms-fullscreen canvas {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 180px);
}

.projector-room-diagram:fullscreen .projector-diagram-legend,
.projector-room-diagram:-webkit-full-screen .projector-diagram-legend,
.projector-room-diagram:-moz-full-screen .projector-diagram-legend,
.projector-room-diagram:-ms-fullscreen .projector-diagram-legend {
    margin-top: 30px;
}

.projector-room-diagram:fullscreen .projector-diagram-note,
.projector-room-diagram:-webkit-full-screen .projector-diagram-note,
.projector-room-diagram:-moz-full-screen .projector-diagram-note,
.projector-room-diagram:-ms-fullscreen .projector-diagram-note {
    margin-top: 20px;
    font-size: 1rem;
}

.projector-diagram-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.projector-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #a0aec0;
}

.projector-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.projector-legend-dot.projector {
    background: #667eea;
}

.projector-legend-dot.screen {
    background: #48bb78;
}

.projector-legend-dot.viewer {
    background: #a0aec0;
}

/* ===== Suggestions Card ===== */
.projector-suggestion-card {
    background: rgba(102, 126, 234, 0.1);
    border-left: 4px solid #667eea;
    border-radius: 0 12px 12px 0;
    padding: 15px 20px;
    margin-bottom: 15px;
}

.projector-suggestion-title {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.projector-suggestion-text {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== Reference Table ===== */
.projector-reference-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.projector-reference-table th,
.projector-reference-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.projector-reference-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.projector-reference-table th:first-child {
    border-radius: 8px 0 0 0;
}

.projector-reference-table th:last-child {
    border-radius: 0 8px 0 0;
}

.projector-reference-table tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.projector-reference-table tr:last-child td:first-child {
    border-radius: 0 0 0 8px;
}

.projector-reference-table tr:last-child td:last-child {
    border-radius: 0 0 8px 0;
}

/* ===== Chart Container ===== */
.projector-chart-container {
    position: relative;
    height: 300px;
    margin: 15px 0;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .projector-tabs {
        flex-direction: column;
    }

    .projector-tab {
        padding: 12px 15px;
    }

    .projector-result-value {
        font-size: 2.5rem;
    }

    .projector-result-details {
        grid-template-columns: 1fr;
    }

    .projector-room-diagram canvas {
        height: 200px;
    }

    .projector-reference-table {
        font-size: 0.8rem;
    }

    .projector-reference-table th,
    .projector-reference-table td {
        padding: 8px 6px;
    }

    .projector-chart-container {
        height: 250px;
    }
}

@media (max-width: 576px) {
    .projector-input-row {
        flex-direction: column;
    }

    .projector-diagram-legend {
        gap: 10px;
    }

    .projector-legend-item {
        font-size: 0.75rem;
    }
}

/* ===== Animation ===== */
@keyframes projectorFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.projector-result-card {
    animation: projectorFadeIn 0.5s ease;
}
