/* =========================================================
   COMMUNITY STOCKS — FINAL POLISHED CSS (COPY & PASTE)
   Brand colors:
   Purple     #845ec2
   Orange     #ff9903
   Turquoise  #009999

   ✔ Scoped ONLY to Community Stocks
   ✔ Does NOT affect Stock Detail page
   ✔ Safe with AJAX / pagination
   ========================================================= */


/* =========================
   CONTAINER & TITLE
   ========================= */

.stock-table-container {
    max-width: 100%;
    margin: 20px auto;
}

.stock-table-container h1,
.stock-table-container h2 {
    color: #845ec2;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 20px;
}


/* =========================
   A–Z FILTER
   ========================= */

.stock-table-container .az-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px 14px;
    font-size: 13px;
    align-items: center;

    background: #faf8ff; /* light purple tint */
    border: 1px solid rgba(132, 94, 194, 0.2);
    border-radius: 8px;
}

.stock-table-container .az-filter a {
    color: #845ec2;
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.stock-table-container .az-filter a:hover {
    background: rgba(132, 94, 194, 0.1);
}

.stock-table-container .az-filter a.active {
    background: #845ec2;
    color: #fff;
    font-weight: 600;
}

.stock-table-container .az-filter a[data-letter=""] {
    margin-left: 12px;
    color: #666;
}


/* =========================
   SEARCH BOX
   ========================= */

#stock-search {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 18px;

    border: 2px solid #ff9903;
    border-radius: 8px;
    font-size: 14px;
}

#stock-search:focus {
    outline: none;
    border-color: #845ec2;
    box-shadow: 0 0 0 3px rgba(132, 94, 194, 0.15);
}


/* =========================
   TABLE
   ========================= */

.stock-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.stock-table th,
.stock-table td {
    border: 1px solid #ddd;
    padding: 12px 10px;
    text-align: left;
    font-size: 14px;
}

.stock-table thead th {
    background: #f4f0fb; /* soft purple */
    font-weight: 600;
    color: #333;
}

/* Zebra rows */
.stock-table tbody tr:nth-child(even) {
    background: #fafafa;
}

/* Hover */
.stock-table tbody tr:hover {
    background: rgba(0, 153, 153, 0.08); /* turquoise hover */
    cursor: pointer;
}


/* =========================
   LINKS
   ========================= */

.stock-table a {
    color: #845ec2;
    font-weight: 500;
    text-decoration: none;
}

.stock-table a:hover {
    color: #009999;
    text-decoration: underline;
}


/* =========================
   FORUM BUTTON
   ========================= */

.stock-table .forum-btn {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;

    background: #009999;
    color: #fff !important;

    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
}

.stock-table .forum-btn:hover {
    background: #007777;
}


/* =========================
   PAGINATION
   ========================= */

.pagination {
    margin-top: 18px;
    text-align: center;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 6px 10px;
    margin: 0 2px;
    border-radius: 6px;
    font-size: 13px;
}

.pagination a {
    color: #845ec2;
    text-decoration: none;
}

.pagination a:hover {
    background: rgba(132, 94, 194, 0.1);
}

.pagination .current {
    background: #845ec2;
    color: #fff;
}

/* =========================
   STOCK DETAIL PAGE ONLY
   ========================= */

/* ✅ IMPORTANT: card width (was missing) */
.stock-detail-card {
    max-width: 900px;
    width: 100%;
    margin: 40px auto;
    padding: 32px 36px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* Section titles — purple branding */
.stock-detail-card .stock-section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #845ec2;
    border-bottom: 3px solid #845ec2;
    padding-bottom: 10px;
    margin-bottom: 18px;
}

/* Section spacing */
.stock-detail-card .stock-section {
    margin-top: 40px;
}

/* Table wrapper */
.stock-detail-card .stock-info-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: #faf8ff;
    border-radius: 10px;
    overflow: hidden;
}

/* Rows */
.stock-detail-card .stock-info-table tr {
    border-bottom: 1px solid rgba(132, 94, 194, 0.25);
}

.stock-detail-card .stock-info-table tr:last-child {
    border-bottom: none;
}

/* Cells */
.stock-detail-card .stock-info-table td {
    padding: 14px 18px;
    font-size: 14px;
    vertical-align: top;
}

/* Label column */
.stock-detail-card .stock-info-table td.label {
    width: 40%;
    color: #333;
    font-weight: 500;
}

/* Value column */
.stock-detail-card .stock-info-table td.value {
    width: 60%;
    text-align: right;
    font-weight: 600;
    color: #777; /* default (dash rows) */
}

/* Long text */
.stock-detail-card .stock-info-table td.value.long-text,
.stock-detail-card .stock-info-table td.value.value-multiline {
    text-align: left;
    font-weight: 400;
    line-height: 1.7;
    white-space: normal;
    color: #111;
}

/* Hover */
.stock-detail-card .stock-info-table tr:hover {
    background: rgba(132, 94, 194, 0.06);
}

/* Mobile */
@media (max-width: 768px) {
    .stock-detail-card {
        padding: 20px;
    }

    .stock-detail-card .stock-info-table td {
        padding: 12px 14px;
    }
}
