/* ================================================================
   Stock Selector – styles.css
   ================================================================ */

/* ── Reset & base ──────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/*
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    padding: 30px 16px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    color: #333;
}
*/



/* ── Card container ────────────────────────────────────────────── */
.containerb {
    background: #fff;
    border-radius: 16px;
/*    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
*/    padding: 36px 40px 40px;
    max-width: 640px;
    width: 100%;
}

/* ── Header ────────────────────────────────────────────────────── */
.headerb {
    text-align: center;
    margin-bottom: 28px;
}

.headerb h1 {
    font-size: 2rem;
    color: #1a1a2e;
    letter-spacing: -0.5px;
}

.stock-count {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.82rem;
    color: #888;
}

/* ── Section headings ──────────────────────────────────────────── */
h3 {
    color: #1a1a2e;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 24px 0 14px;
    padding-bottom: 7px;
    border-bottom: 2px solid #e8eaf6;
}

/* ── Search area ───────────────────────────────────────────────── */
.search-section {
    position: relative;
    margin-bottom: 8px;
}

.input-groupb {
    display: flex;
    gap: 10px;
}

#stockInput {
    flex: 1;
    padding: 13px 16px;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    transition: border-color 0.25s, box-shadow 0.25s;
    background: #fafafa;
}

#stockInput:focus {
    outline: none;
    border-color: #5c6bc0;
    box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.15);
    background: #fff;
}

#goButton {
    padding: 13px 28px;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #5c6bc0, #42a5f5);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    white-space: nowrap;
}

#goButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(92, 107, 192, 0.4);
}

#goButton:active  { transform: translateY(0); }

/* ── Status bar ────────────────────────────────────────────────── */
.status {
    margin-top: 10px;
    padding: 9px 12px;
    background: #eef1fb;
    border-left: 4px solid #5c6bc0;
    border-radius: 4px;
    font-size: 0.88rem;
    color: #444;
    min-height: 36px;                        /* keeps layout stable */
}

/* ── Suggestions dropdown ─────────────────────────────────────── */
.suggestions {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    /* stop just before the Go button */
    right: 88px;
    background: #fff;
    border: 2px solid #5c6bc0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.suggestions.show { display: block; }

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s;
}

.suggestion-item:last-child          { border-bottom: none; }
.suggestion-item:hover,
.suggestion-item.selected            { background-color: #eef1fb; }

.suggestion-symbol {
    font-weight: 700;
    color: #5c6bc0;
    font-size: 0.95rem;
    min-width: 58px;
}

.suggestion-name {
    color: #555;
    font-size: 0.88rem;
    flex: 1;
}

/* Exchange badge */
.suggestion-exchange {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    padding: 2px 7px;
    border-radius: 20px;
    white-space: nowrap;
}

.badge-nasdaq {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-nyse {
    background: #fff3e0;
    color: #e65100;
}

/* ── Option rows ───────────────────────────────────────────────── */
.rowb {
    display: flex;
    gap: 16px;
}

.rowb .option-groupb { flex: 1; }

.option-groupb {
    margin-bottom: 14px;
}

.option-groupb label {
    display: block;
    margin-bottom: 5px;
    color: #444;
    font-weight: 500;
    font-size: 0.9rem;
}

.option-groupb label em {
    font-weight: 400;
    color: #999;
}

/* number / text inputs */
.option-groupb input[type="number"],
.option-groupb input[type="text"] {
    width: 100%;
    padding: 9px 11px;
    font-size: 0.9rem;
    border: 2px solid #ddd;
    border-radius: 7px;
    background: #fafafa;
    transition: border-color 0.25s;
}

.option-groupb input[type="number"]:focus,
.option-groupb input[type="text"]:focus {
    outline: none;
    border-color: #5c6bc0;
    background: #fff;
}

/* unit label beside number inputs */
.input-unit {
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-unit input { flex: 1; }

.input-unit span {
    color: #888;
    font-size: 0.85rem;
    min-width: 22px;
}

/* helper text */
.option-groupb small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 0.8rem;
    line-height: 1.4;
}

.option-groupb small code {
    background: #f0f4ff;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.82rem;
    color: #5c6bc0;
}

/* ── Checkbox ──────────────────────────────────────────────────── */
.checkbox-groupb label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 0.9rem;
    color: #444;
}

.checkbox-groupb input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #5c6bc0;
    cursor: pointer;
}

/* ── Custom scrollbar (suggestions list) ──────────────────────── */
.suggestions::-webkit-scrollbar       { width: 7px; }
.suggestions::-webkit-scrollbar-track { background: #f5f5f5; border-radius: 0 0 10px 0; }
.suggestions::-webkit-scrollbar-thumb { background: #5c6bc0; border-radius: 4px; }
.suggestions::-webkit-scrollbar-thumb:hover { background: #4a5ab8; }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 620px) {
    .containerb        { padding: 24px 20px 28px; }
    .headerb h1        { font-size: 1.5rem; }
    .input-groupb      { flex-direction: column; }
    .suggestions      { right: 0; }
    .rowb              { flex-direction: column; gap: 0; }
}
