/* YarnLengthWeightConverter.css - 毛線長度重量換算 */
/* DO NOT redefine global classes from layout.css */

/* Input wrapper styling */
.input-group-custom {
    margin-bottom: 15px;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
}

.input-label i {
    color: #667eea;
}

.input-wrapper {
    position: relative;
}

.input-range {
    font-size: 0.75rem;
    color: #a0aec0;
    margin-top: 4px;
}

/* Tooltip */
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-size: 11px;
    cursor: help;
    position: relative;
    font-weight: bold;
}

.tooltip-icon .tooltip-text {
    visibility: hidden;
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: #2d3748;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: normal;
    white-space: nowrap;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip-icon:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Conversion mode tabs */
.conversion-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* Result card styling */
.result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.result-main {
    text-align: center;
    padding: 20px 0;
}

.result-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.result-value {
    font-size: 2.8rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.result-unit {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-left: 5px;
}

.result-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    margin: 20px 0;
}

/* Result details */
.result-details {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.result-item:last-child {
    border-bottom: none;
}

.result-item-label {
    font-size: 0.95rem;
    opacity: 0.9;
}

.result-item-value {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Yarn weight reference table */
.reference-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.9rem;
}

.reference-table th,
.reference-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.reference-table th {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    font-weight: 600;
    color: #667eea;
}

.reference-table tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.reference-table .highlight-row {
    background: rgba(102, 126, 234, 0.15);
    font-weight: 600;
}

/* Weight category badge */
.weight-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Material info */
.material-info {
    background: #f7fafc;
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
}

.material-info-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.material-info-title i {
    color: #667eea;
}

.material-note {
    font-size: 0.85rem;
    color: #718096;
    line-height: 1.6;
}

/* Input row for two columns */
.input-row {
    display: flex;
    gap: 15px;
}

.input-row > .input-group-custom {
    flex: 1;
}

/* Chart container */
.chart-container {
    position: relative;
    height: 280px;
    margin-top: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .input-row {
        flex-direction: column;
        gap: 0;
    }

    .result-value {
        font-size: 2.2rem;
    }

    .conversion-tabs {
        flex-direction: column;
    }

    .reference-table {
        font-size: 0.8rem;
    }

    .reference-table th,
    .reference-table td {
        padding: 8px;
    }
}
