/* AHF Tool Specific Styles */

.ahf-voltage-tag {
    display: inline-block;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

[data-theme="dark"] .ahf-voltage-tag {
    background: #1e3a8a;
    border-color: #1d4ed8;
    color: #93c5fd;
}

.ahf-solution {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 1rem;
}

.solution-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px dashed var(--border);
}

.header-values {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.calc-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.total-label {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1rem;
}

.total-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.module-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.module-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.6rem 1.2rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.module-badge {
    background: #fef3c7;
    color: #92400e;
    padding: 0.4rem 1rem;
    border-radius: 0.8rem;
    font-weight: 800;
    font-size: 1.1rem;
}

[data-theme="dark"] .module-badge {
    background: #451a03;
    color: #fcd34d;
}

.module-qty {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
}

/* Estimation Panel Styles */
.estimation-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--shadow);
}

.estimation-panel h3 {
    margin-bottom: 1.5rem;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.estimation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .estimation-grid {
        grid-template-columns: 1fr;
    }
}

.estimation-input {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-main);
    padding: 1.5rem;
    border-radius: 0.75rem;
}

.estimation-input label {
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.input-with-btn {
    display: flex;
    gap: 0.5rem;
}

.input-with-btn input {
    flex: 2;
    /* Take more space compared to button */
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    border: 2px solid var(--border);
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 1.4rem;
    font-weight: 800;
    min-width: 180px;
    /* Ensure it stays big */
    transition: border-color 0.2s;
}

.input-with-btn input:focus {
    outline: none;
    border-color: var(--primary);
}

.input-with-btn button {
    flex: 1;
    padding: 1rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.estimation-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.est-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--bg-main);
    border-radius: 0.75rem;
}

.est-item.highlight {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.est-item label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.est-item span {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
}

.est-item.highlight span {
    color: #10b981;
}

.est-note {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* Mobile Responsive - AHF Tool */
@media (max-width: 768px) {
    .ahf-solution {
        padding: 1rem;
    }

    .solution-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .header-values {
        align-items: flex-start;
    }

    .total-value {
        font-size: 1.2rem;
    }

    .module-list {
        gap: 0.5rem;
    }

    .module-item {
        padding: 0.4rem 0.8rem;
        gap: 0.5rem;
    }

    .module-badge {
        font-size: 0.9rem;
        padding: 0.3rem 0.7rem;
    }

    .module-qty {
        font-size: 1.1rem;
    }

    .estimation-panel {
        padding: 1.25rem;
    }

    .estimation-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .estimation-input {
        padding: 1rem;
    }

    .input-with-btn {
        flex-direction: column;
    }

    .input-with-btn input {
        min-width: unset;
        width: 100%;
        font-size: 1.2rem;
    }

    .input-with-btn button {
        width: 100%;
        padding: 0.8rem;
    }

    .est-item {
        padding: 0.75rem 1rem;
    }

    .est-item span {
        font-size: 1.2rem;
    }

    .est-item.highlight span {
        font-size: 1.3rem;
    }

    .est-note {
        font-size: 0.75rem;
    }
}