/* Buttons */
.icon-btn {
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 50%;
    color: var(--text-color);
    transition: background-color 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background-color: var(--border-color);
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: background-color 0.2s;
    width: 100%;
    margin-top: 1rem;
}

.primary-btn:hover {
    background-color: var(--primary-hover);
}

/* Calculator Table */
.calculator-container {
    background-color: var(--card-bg);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    overflow: hidden;
}

.calc-table {
    width: 100%;
}

.calc-table th {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-color);
    font-weight: 600;
}

.calc-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.denom-col {
    font-weight: 500;
}

.input-col {
    width: 120px;
}

.total-col {
    text-align: right;
    font-weight: 600;
}

.qty-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--input-border);
    border-radius: 0.25rem;
    background-color: var(--input-bg);
    color: var(--text-color);
    text-align: right;
    font-size: 1rem;
}

.qty-input:focus {
    outline: 2px solid var(--primary-color);
    border-color: transparent;
}

.section-header {
    background-color: var(--secondary-bg);
    font-weight: 600;
    text-align: center;
    padding: 0.5rem;
}

.subtotal-row td {
    border-top: 2px solid var(--border-color);
    font-weight: 600;
    background-color: var(--secondary-bg);
}

.total-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: var(--highlight);
    border-radius: 0.5rem;
    color: var(--primary-color);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.hidden {
    display: none !important;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.close-btn {
    font-size: 1.5rem;
    color: var(--text-color);
}

/* FAQ Bubble */
.faq-bubble {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    z-index: 90;
}

.faq-bubble:hover {
    transform: scale(1.1);
}

/* Tooltip */
.info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 50%;
    background-color: var(--text-color);
    color: var(--card-bg);
    font-size: 0.75rem;
    margin-left: 0.5rem;
    cursor: help;
    position: relative;
}

.info-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10;
}

/* Dropdown */
.dropdown {
    position: absolute;
    top: 120%;
    right: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    width: 250px;
    display: flex;
    flex-direction: column;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    text-align: left;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

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

.dropdown-item:hover {
    background-color: var(--secondary-bg);
    color: var(--primary-color);
}
