/* AtlasMarketWatch — Symbol Modal (v1.6.0) */

.amw-modal{
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}
.amw-modal.is-open{ display: flex; }

.amw-modal-backdrop{
    position: absolute;
    inset: 0;
    background: rgba(15,22,38,0.78);
    backdrop-filter: blur(2px);
}

.amw-modal-panel{
    position: relative;
    width: min(640px, 92vw);
    max-height: 86vh;
    overflow-y: auto;
    background: #1f2024;
    border: 1px solid #343a40;
    box-shadow: 0 12px 48px rgba(0,0,0,0.5);
    color: #ffffff;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    border-radius: 0; /* Atlas brand: sharp edges */
    display: flex;
    flex-direction: column;
}

.amw-modal-close{
    position: absolute;
    top: 10px;
    right: 14px;
    background: transparent;
    border: 0;
    color: #a0a1ad;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
}
.amw-modal-close:hover{ color: #ffffff; }

.amw-modal-head{
    padding: 22px 24px 12px;
    border-bottom: 1px solid #343a40;
}
.amw-modal-sym{
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.05em;
    line-height: 1;
}
.amw-modal-name{
    font-size: 13px;
    color: #a0a1ad;
    margin-top: 6px;
}

.amw-modal-stats{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #343a40;
    border-bottom: 1px solid #343a40;
}
.amw-modal-stat{
    background: #1f2024;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.amw-modal-stat-label{
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 9px;
    font-weight: 700;
    color: #a0a1ad;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    line-height: 1;
}
.amw-modal-stat-val{
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}
.amw-modal-stat-val.is-up   { color: #4ade80; }
.amw-modal-stat-val.is-down { color: #f87171; }

.amw-modal-chart{
    min-height: 320px;
    background: #131418;
    position: relative;
}
.amw-modal-chart iframe{
    width: 100% !important;
    height: 320px !important;
    border: 0 !important;
    display: block;
}
.amw-modal-chart-loading{
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0a1ad;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.amw-modal-foot{
    padding: 12px 24px;
    border-top: 1px solid #343a40;
    text-align: right;
}
.amw-modal-tv{
    font-size: 12px;
    font-weight: 600;
    color: #4ade80;
    text-decoration: none;
}
.amw-modal-tv:hover{ text-decoration: underline; }

/* Body scroll lock */
body.amw-modal-locked{ overflow: hidden; }

/* Tablet/mobile */
@media (max-width: 640px){
    .amw-modal-panel{ width: 96vw; max-height: 90vh; }
    .amw-modal-stats{ grid-template-columns: repeat(2, 1fr); }
    .amw-modal-chart iframe{ height: 260px !important; }
}
