/* ========================
   GLOBAL RESET & BASE
======================== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
}

/* ========================
   HEADER
======================== */
header {
    background-color: #1a1a1a;
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
}

header h1 a {
    color: white;
    text-decoration: none;
}

header h1 a:hover {
    text-decoration: underline;
}

.header-buttons button {
    margin-left: 10px;
    padding: 8px 16px;
    background-color: #00b894;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 4px;
}

.header-buttons button:hover {
    background-color: #019874;
}

/* ========================
   TICKER
======================== */
.ticker-container {
    overflow: hidden;
    background-color: #111;
    color: #0f0;
    height: 2rem;
    display: flex;
    align-items: center;
    font-family: 'Roboto Mono', monospace;
    font-size: 1rem;
    white-space: nowrap;
}

.ticker-strip {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
    transform: translateX(0);
}

.ticker-item {
    margin-right: 40px;
    display: inline-block;
}

.ticker-time {
    margin-left: 20px;
    font-style: italic;
    color: #ccc;
    font-size: 0.9em;
}

.ticker-separator {
    margin: 0 20px;
    color: #444;
}

.arrow-up {
    color: green;
}

.arrow-down {
    color: red;
}

.arrow-neutral {
    color: gray;
}

/* ========================
   MAIN LAYOUT
======================== */
main {
    flex: 1;
}

.mid-container {
    width: 90%;
    margin: 2rem auto;
}

.tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid #ccc;
}

.tab {
    padding: 10px 20px;
    background: #eee;
    border: 1px solid #ccc;
    cursor: pointer;
}

.tab.active {
    background: white;
    border-bottom: none;
    font-weight: bold;
    color: #007BFF;
}

.tab-content {
    border: 1px solid #ccc;
    padding: 1rem;
    background: white;
    margin-top: -1px;
}

/* ========================
   TABLES
======================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    border: 1px solid #ddd;
    padding: 6px;
    text-align: center;
}

th {
    background-color: #f5f5f5;
}

input.sell-value {
    width: 80px;
    text-align: right;
}

/* ========================
   BUTTONS
======================== */
.button-row {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.button-row button,
.button-row a.button-cancel {
    padding: 8px 16px;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.button-row button {
    background: #007BFF;
    color: white;
}

.button-row a.button-cancel {
    background: #dc3545;
    color: white;
}

/* ========================
   MISC UTILITY
======================== */
.error {
    color: red;
    font-weight: bold;
    margin-bottom: 15px;
}

.fade-in {
    opacity: 1;
    transition: opacity 0.8s ease-in;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.6s ease-out;
}

/* ========================
   MEMBERS_INDEX SECTION
======================== */
.mid-section {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    padding: 20px 20px;
    box-sizing: border-box;
}

.placeholder {
    width: 30%;
    min-width: 280px;
    background-color: #f0f0f0;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 1px 1px 5px #ccc;
}

#portfolioChart {
    max-width: 300px;
    max-height: 300px;
    margin: 0 auto 2rem;
    display: block;
}

.details-link {
    color: #007BFF;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}

.details-link:hover {
    text-decoration: underline;
}

#details-container {
    margin-top: 1rem;
    border: 1px solid #ccc;
    padding: 1rem;
    background: #f9f9f9;
    display: none;
    position: relative;
}

#close-details {
    position: absolute;
    top: 8px;
    right: 8px;
    cursor: pointer;
    background: #eee;
    border: none;
    padding: 4px 8px;
}

/* ========================
   FOOTER
======================== */
footer {
    width: 100%;
    background-color: #000000;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

footer p {
    margin: 0;
    font-size: 14px;
    color: #FFFFFF;
}
