/* CalWhat Calculator Platform - UniformInvoiceCalculator Specific Styles */
/* Mobile-first: base = mobile, scale up with min-width. 全域 class (.glass-card/.form-input/.btn-*) 不重定義 */

/* ========== Input Styles ========== */
.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.input-label i {
    margin-right: 8px;
    color: #667eea;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .form-input {
    width: 100%;
    display: block;
    box-sizing: border-box;
}

.input-wrapper select.form-input {
    appearance: auto;
    -webkit-appearance: menulist;
    cursor: pointer;
}

.input-suffix {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-weight: 500;
    pointer-events: none;
    font-size: 0.9rem;
}

/* ========== Tooltip ========== */
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
    margin-left: 8px;
    cursor: help;
    position: relative;
    flex-shrink: 0;
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2d3748;
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 400;
    white-space: normal;
    min-width: 180px;
    max-width: 260px;
    z-index: 1000;
    transition: opacity 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    line-height: 1.4;
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #2d3748;
}

.tooltip-icon:hover .tooltip-text,
.tooltip-icon:focus .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ========== Result Display ========== */
.result-card {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    text-align: center;
}

.result-title {
    font-size: 0.95rem;
    color: #718096;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-title i {
    margin-right: 8px;
    color: #667eea;
}

.result-value {
    font-size: 2rem;
    font-weight: 800;
    color: #667eea;
    line-height: 1.2;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item-label {
    font-weight: 600;
    color: #4a5568;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.result-item-label i {
    margin-right: 8px;
    color: #667eea;
    font-size: 0.85rem;
}

.result-item-value {
    font-weight: 700;
    color: #2d3748;
    font-size: 0.95rem;
}

/* ========== Prize Table ========== */
.prize-table-wrapper {
    overflow-x: auto;
    margin-top: 8px;
}

.prize-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.prize-table thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 600;
    padding: 10px 8px;
    text-align: left;
    white-space: nowrap;
}

.prize-table thead th:first-child {
    border-top-left-radius: 10px;
}

.prize-table thead th:last-child {
    border-top-right-radius: 10px;
}

.prize-table tbody td {
    padding: 10px 8px;
    border-bottom: 1px solid #e2e8f0;
    color: #2d3748;
}

.prize-table tbody tr:nth-child(even) {
    background: #f7fafc;
}

.prize-table .prize-name {
    font-weight: 600;
    color: #4a5568;
    white-space: nowrap;
}

.prize-table .prize-amount {
    font-weight: 600;
    color: #f59e0b;
    white-space: nowrap;
}

.prize-table .prize-prob {
    color: #667eea;
    font-weight: 600;
    white-space: nowrap;
}

/* ========== Chart ========== */
.chart-container {
    position: relative;
    height: 300px;
    margin-top: 8px;
}

/* ========== Method Note ========== */
.year-note {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 12px;
    text-align: center;
}

.year-note a {
    color: #667eea;
}

/* ========== Responsive ========== */
@media (min-width: 992px) {
    .result-value {
        font-size: 2.4rem;
    }
}
