/* Stock Summary - Custom Styles */

:root {
    --bs-body-bg: #f8f9fa;
}

/* Currency display toggle - CSS only, no recalculation */
body.hide-usd .cur-usd { display: none !important; }
body.hide-eur .cur-eur { display: none !important; }
body.hide-usd .cur-sep,
body.hide-eur .cur-sep { display: none !important; }
body:not(.hide-eur) .cur-eur { color: inherit !important; font-size: inherit !important; }

body {
    font-size: 0.9rem;
}

/* Summary Cards */
.summary-card {
    height: 100%;
    transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}
.drop-zone:hover,
.drop-zone.dragover {
    border-color: #0d6efd;
    background-color: #e8f0fe;
}

/* Nav tabs styling */
.nav-tabs .nav-link {
    color: #6c757d;
    font-size: 0.85rem;
}
.nav-tabs .nav-link.active {
    font-weight: 600;
}

/* DataTables tweaks */
.dataTables_wrapper .dataTables_filter input {
    border-radius: 4px;
    border: 1px solid #dee2e6;
    padding: 4px 8px;
}
.dt-buttons .btn.btn-secondary {
    background-color: transparent;
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}
.dt-buttons .btn.btn-secondary:hover {
    background-color: var(--bs-primary);
    color: #fff;
}

/* Table number formatting */
.table .text-end {
    font-variant-numeric: tabular-nums;
}

/* Card headers */
.card-header {
    background-color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Gain/Loss coloring */
.text-gain { color: #198754; }
.text-loss { color: #dc3545; }

/* Sticky table headers */
.sticky-top {
    z-index: 1;
}

/* Print styles for Tax Declaration */
@media print {
    .navbar, .nav-tabs, .card-header .d-flex .btn,
    .card-header select, #mainTabs {
        display: none !important;
    }
    .tab-pane {
        display: block !important;
        opacity: 1 !important;
    }
    .tab-pane:not(#declaration) {
        display: none !important;
    }
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    body {
        font-size: 12px;
    }
}

/* FIFO lots highlight */
#fifoLotsTable .used-lot {
    background-color: #fff3cd;
}

/* Sales table expand/collapse */
.sale-summary-row {
    cursor: pointer;
}
.sale-summary-row:hover {
    background-color: #f0f4ff !important;
}
.sale-summary-row.shown {
    background-color: #e8edff !important;
    border-bottom: none;
}
.expand-icon {
    font-size: 0.8rem;
    transition: transform 0.15s;
}
/* Lot detail rows */
.sale-lot-row {
    background-color: #f8f9fa !important;
    font-size: 0.82rem;
}
.sale-lot-row td {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    border-top: 1px dashed #dee2e6 !important;
}

/* Sale mode pills */
#saleModeNav .nav-link {
    font-size: 0.8rem;
    padding: 4px 12px;
}

/* Chart canvas responsive */
canvas {
    max-width: 100%;
}

/* Badge in price bar */
#currentPrice .badge {
    font-size: 0.85rem;
    padding: 6px 12px;
}

/* Scrollable table body */
.table-responsive {
    scrollbar-width: thin;
}

/* Toast-like notifications */
.toast-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 1080;
}
