/* Financial Modal Styles */

.info-btn-financials {
    background: var(--primary-gold);
    border: none;
    color: var(--dark-bg);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.info-btn-financials:hover {
    transform: scale(1.1);
    background: #f4d03f;
}

.financial-modal {
    display: none;
    position: fixed !important;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center !important;
    justify-content: center !important;
}

.financial-modal.show {
    display: flex !important;
    opacity: 1;
}

.financial-modal-content {
    background-color: white;
    padding: 2.5rem;
    border-radius: 12px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.financial-modal.show .financial-modal-content {
    transform: translateY(0);
}

.financial-modal-close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2.5rem;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.financial-modal-close:hover {
    color: #c41e3a;
}

.financial-modal-content h2 {
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    padding-right: 2rem;
    border-bottom: 3px solid #D4AF37;
    padding-bottom: 0.5rem;
}

.financial-modal-content h3 {
    color: #1a1a1a;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.financial-modal-content h4 {
    color: #1a1a1a;
    margin: 1rem 0 0.5rem;
}

/* Cost Summary */
.cost-summary {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 2px solid #D4AF37;
}

.cost-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 1.1rem;
}

.cost-row.total {
    border-top: 2px solid #333;
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-size: 1.3rem;
}

.price-green {
    color: #28a745;
    font-weight: 600;
}

.price-red {
    color: #dc3545;
}

/* Cost Breakdown Table */
.cost-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.cost-breakdown-table thead {
    background: #1a1a1a;
    color: white;
}

.cost-breakdown-table th,
.cost-breakdown-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.cost-breakdown-table tbody tr:hover {
    background: #f8f9fa;
}

.cost-breakdown-table .source {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

.subtotal-row {
    background: #fff9e6 !important;
    border-top: 2px solid #333 !important;
}

/* Notes List */
.notes-list {
    list-style: none;
    padding: 0;
}

.notes-list li {
    padding: 0.5rem 0 0.5rem 1.5rem;
    position: relative;
    line-height: 1.6;
}

.notes-list li:before {
    content: "💡";
    position: absolute;
    left: 0;
}

/* Total Breakdown */
.total-breakdown {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.total-breakdown h4 {
    color: white;
    margin-top: 0;
}

.equation {
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.2);
    padding: 1rem;
    border-radius: 4px;
    margin: 0;
}

.eq-sell {
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem;
}

.eq-minus {
    color: #ffc107;
    margin: 0 0.5rem;
}

.eq-ing {
    color: #fff;
    font-weight: bold;
}

.eq-oh {
    color: #fff;
    font-weight: bold;
}

.eq-equals {
    color: #ffc107;
    margin: 0 0.5rem;
    font-weight: bold;
}

.eq-profit {
    color: #fff;
    font-weight: bold;
    font-size: 1.3rem;
}

.eq-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0 0.3rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .financial-modal-content {
        padding: 1.5rem;
        width: 95%;
        max-height: 95vh;
    }

    .cost-breakdown-table {
        font-size: 0.85rem;
    }

    .cost-breakdown-table th,
    .cost-breakdown-table td {
        padding: 0.5rem;
    }

    .equation {
        font-size: 0.9rem;
    }
}