/* RFPowerConverter.css - RF Power Converter Calculator Styles */
/* ⚠️ Only calculator-specific styles. DO NOT redefine global classes from layout.css */

/* Result card styling */
.result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
}

.result-card .card-title {
    color: white;
    margin-bottom: 20px;
}

/* Result items */
.result-main {
    text-align: center;
    padding: 20px 0;
}

.result-main .result-value {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Roboto Mono', monospace;
    margin-bottom: 5px;
}

.result-main .result-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.result-divider {
    border-color: rgba(255, 255, 255, 0.3);
    margin: 15px 0;
}

/* Results grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.result-item {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.result-item-label {
    font-size: 0.85rem;
    opacity: 0.9;
    display: block;
    margin-bottom: 5px;
}

.result-item-value {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Roboto Mono', monospace;
}

/* Impedance display */
#impedance-display {
    font-size: 0.85rem;
    opacity: 0.8;
    text-align: center;
    margin-top: 10px;
}

/* Input groups */
.input-group-custom {
    margin-bottom: 15px;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 8px;
}

.input-label i {
    color: #667eea;
}

/* Unit selector inline */
.input-with-unit {
    display: flex;
    gap: 10px;
}

.input-with-unit .form-input {
    flex: 1;
}

.input-with-unit select {
    width: 120px;
}

/* Custom impedance group */
#customImpedanceGroup {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

/* Reference table */
.reference-table-container {
    max-height: 400px;
    overflow-y: auto;
}

.reference-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.reference-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 10px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1;
}

.reference-table td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.reference-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.reference-row:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.reference-row:active {
    background-color: rgba(102, 126, 234, 0.2);
}

.reference-row td:first-child {
    font-family: 'Roboto Mono', monospace;
    color: #667eea;
}

/* Reference table description */
.reference-subtitle {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 15px;
}

/* Power scale visualization */
.power-scale-container {
    position: relative;
    height: 80px;
    padding: 10px 0;
}

#powerScaleCanvas {
    width: 100% !important;
    height: 60px !important;
}

/* Power scale markers */
.power-scale-markers {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #718096;
    margin-top: 5px;
}

/* Tooltip styling */
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #e2e8f0;
    border-radius: 50%;
    font-size: 0.7rem;
    color: #718096;
    cursor: help;
    position: relative;
}

.tooltip-icon:hover .tooltip-text {
    display: block;
}

.tooltip-text {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #2d3748;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 100;
    margin-bottom: 5px;
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #2d3748;
}

/* Formula section */
.formulas-container {
    background: #f7fafc;
    border-radius: 12px;
    padding: 20px;
}

.formula-item {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid #667eea;
}

/* Responsive styles */
@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
    }

    .result-main .result-value {
        font-size: 2rem;
    }

    .input-with-unit {
        flex-direction: column;
    }

    .input-with-unit select {
        width: 100%;
    }

    .reference-table {
        font-size: 0.8rem;
    }

    .reference-table th,
    .reference-table td {
        padding: 8px 5px;
    }

    .power-scale-markers {
        font-size: 0.65rem;
    }
}

/* Animation for result updates */
@keyframes resultUpdate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

.result-updated {
    animation: resultUpdate 0.3s ease;
}

/* High power warning */
.high-power-warning {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    border-radius: 8px;
    padding: 10px 15px;
    margin-top: 15px;
    color: #ef4444;
    font-size: 0.85rem;
}

.high-power-warning i {
    margin-right: 5px;
}
