/* ── Theme: warm off-white ─────────────────────────────────────────────────
   Overrides Bootstrap 5 CSS variables to replace stark white with a softer,
   warmer palette that is easier on the eyes.
   ─────────────────────────────────────────────────────────────────────────── */
:root {
    --bs-body-bg:              #f0ebe4;   /* warm off-white page background    */
    --bs-body-color:           #2e2c29;   /* dark warm brown instead of black  */
    --bs-secondary-color:      rgba(46, 44, 41, 0.60);
    --bs-tertiary-color:       rgba(46, 44, 41, 0.38);
    --bs-border-color:         #d9d3cb;   /* soft warm border                  */
    --bs-border-color-translucent: rgba(46, 44, 41, 0.12);
    --bs-body-tertiary-bg:     #e8e2db;   /* navbar / footer / muted surfaces  */
    --bs-secondary-bg:         #ede8e1;
    --bs-tertiary-bg:          #e4dfd8;
    --mcc-surface:             #faf8f5;   /* card / modal surface              */
}

/* Cards and modals get a slightly lighter surface than the page bg */
.card                { --bs-card-bg: var(--mcc-surface); }
.modal-content       { background-color: var(--mcc-surface); }
.dropdown-menu       { --bs-dropdown-bg: var(--mcc-surface); }
.list-group-item     { --bs-list-group-bg: var(--mcc-surface); }
.offcanvas           { --bs-offcanvas-bg: var(--mcc-surface); }
.popover             { --bs-popover-bg:   var(--mcc-surface); }
.toast               { --bs-toast-bg:     var(--mcc-surface); }
.table               { --bs-table-bg: transparent; --bs-table-cell-padding-x: 0.75rem; --bs-table-cell-padding-y: 0.5rem; }

/* ── DataTables wrapper spacing (dt-container = v2.x, dataTables_wrapper = v1.x) */
.dt-container,
.dataTables_wrapper {
    padding: 0.75rem;
}
.dt-container .dt-paging,
.dt-container .dt-info,
.dataTables_wrapper .dataTables_paginate,
.dataTables_wrapper .dataTables_info {
    padding-top: 1rem;
}

/* ── Table row interaction states ────────────────────────────────────────── */
.table-hover tbody tr {
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}
.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.06);
}
.table-hover tbody tr.selected {
    background-color: rgba(13, 110, 253, 0.10);
    border-left: 3px solid #0d6efd;
}

html {
  font-size: 14px;
}

/* ── MCC icon circles ─────────────────────────────────────────────────────── */
.mcc-icon-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mcc-icon-circle.mcc-sm { width: 40px; height: 40px; }

.mcc-icon-circle-primary   { background: rgba(13,  110, 253, 0.10); }
.mcc-icon-circle-success   { background: rgba(25,  135,  84, 0.10); }
.mcc-icon-circle-warning   { background: rgba(255, 193,   7, 0.15); }
.mcc-icon-circle-danger    { background: rgba(220,  53,  69, 0.10); }
.mcc-icon-circle-info      { background: rgba(13,  202, 240, 0.12); }
.mcc-icon-circle-purple    { background: rgba(111,  66, 193, 0.10); }
.mcc-icon-circle-secondary { background: rgba(108, 117, 125, 0.10); }

/* ── Coin browser: denomination navigator ─────────────────────────────────── */
.mcc-denom-nav {
    display: flex;
    flex-direction: column;
}
.mcc-nav-country {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bs-secondary-color);
    padding: 0.75rem 0.875rem 0.2rem;
}
.mcc-nav-country:first-child { padding-top: 0.375rem; }
.mcc-nav-denom {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 0.3rem 0.875rem;
    border-radius: 0.375rem;
    color: var(--bs-body-color);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.12s ease-in-out, color 0.12s ease-in-out;
}
.mcc-nav-denom:hover {
    background: rgba(13, 110, 253, 0.07);
}
.mcc-nav-denom.active-denom {
    background: rgba(13, 110, 253, 0.11);
    color: var(--bs-primary);
    font-weight: 500;
}
.mcc-nav-type-section {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--bs-tertiary-color, #adb5bd);
    padding: 0.5rem 0.875rem 0.15rem;
}
.mcc-nav-type-section--divided {
    margin-top: 0.25rem;
    border-top: 1px solid var(--bs-border-color);
    padding-top: 0.6rem;
}

/* ── Coin browser: series cards ───────────────────────────────────────────── */
.series-card {
    cursor: pointer;
    transition: border-color 0.12s ease-in-out, box-shadow 0.12s ease-in-out;
}
.series-card:hover {
    border-color: rgba(13, 110, 253, 0.4) !important;
}
.series-card.active-series {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 1px var(--bs-primary);
}

/* ── Series card: coin image area ─────────────────────────────────────────── */
.series-card-img-area {
    height: 116px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(180, 130, 30, 0.06);
    border-radius: var(--bs-card-border-radius) var(--bs-card-border-radius) 0 0;
}
.series-coin-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}
.series-coin-img {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    object-fit: fill;
    border: 2px solid rgba(180, 130, 30, 0.25);
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.series-coin-img-dual {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    object-fit: fill;
    border: 2px solid rgba(180, 130, 30, 0.25);
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.series-coin-img-dual + .series-coin-img-dual {
    margin-left: -20px;
    position: relative;
    z-index: 1;
}
.series-coin-placeholder {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: rgba(180, 130, 30, 0.12);
    border: 2px dashed rgba(180, 130, 30, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    color: rgba(160, 115, 20, 0.5);
}

/* ── Strike-type tab bar ──────────────────────────────────────────────────── */
#seriesTabBar {
    background: var(--bs-tertiary-bg);
}
.strike-tab.btn-primary {
    --bs-btn-bg:                  #4a4540;
    --bs-btn-border-color:        #4a4540;
    --bs-btn-hover-bg:            #3a3530;
    --bs-btn-hover-border-color:  #3a3530;
    --bs-btn-active-bg:           #3a3530;
    --bs-btn-active-border-color: #3a3530;
    --bs-btn-color:               #fff;
    border-radius: 2rem;
}
.strike-tab.btn-outline-secondary {
    --bs-btn-color:               #6b6560;
    --bs-btn-border-color:        #c4bcb3;
    --bs-btn-hover-bg:            var(--bs-tertiary-bg);
    --bs-btn-hover-border-color:  #9a928a;
    --bs-btn-hover-color:         var(--bs-body-color);
    border-radius: 2rem;
}
/* Per-type icon tint (inactive/outline state only; active inherits white from btn text) */
.strike-tab.btn-outline-secondary[data-strike-type="1"] .bi { color: #b08030; } /* Circulation — brass   */
.strike-tab.btn-outline-secondary[data-strike-type="2"] .bi { color: #5878a0; } /* Proof — steel blue   */
.strike-tab.btn-outline-secondary[data-strike-type="3"] .bi { color: #487060; } /* Specimen — teal      */

/* ── Auth card pages (login, register, etc.) ──────────────────────────────── */
.mcc-auth-card {
    max-width: 440px;
    margin: 0 auto;
}

/* ── Shared sidebar nav styles (admin + user) ─────────────────────────────── */
.mcc-nav-section-label {
    padding: 0.5rem 0.5rem 0.25rem;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--bs-secondary-color);
}

/* ── User sidebar (sticky on desktop) ─────────────────────────────────────── */
.mcc-user-sidebar {
    position: sticky;
    top: 1rem;
}

/* ── Account manage sidebar ───────────────────────────────────────────────── */
.mcc-manage-nav .nav-link {
    color: var(--bs-body-color);
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.mcc-manage-nav .nav-link:hover {
    background: rgba(13, 110, 253, 0.07);
    color: var(--bs-primary);
}
.mcc-manage-nav .nav-link.active {
    background: rgba(13, 110, 253, 0.12);
    color: var(--bs-primary);
    font-weight: 500;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ── Coin browser: mobile stepper ─────────────────────────────────────────── */
@media (max-width: 767.98px) {
  /* Step 1: show denomination list only */
  #coinBrowser[data-mobile-step="1"] .cb-right { display: none !important; }
  /* Steps 2 & 3: show right panel only */
  #coinBrowser[data-mobile-step="2"] .cb-left,
  #coinBrowser[data-mobile-step="3"] .cb-left  { display: none !important; }
  /* Step 2: hide coins table */
  #coinBrowser[data-mobile-step="2"] #coinsGroup { display: none !important; }
  /* Step 3: hide series cards */
  #coinBrowser[data-mobile-step="3"] #seriesContainer { display: none !important; }
  /* Remove left border when only right panel visible */
  #coinBrowser[data-mobile-step="2"] .cb-right,
  #coinBrowser[data-mobile-step="3"] .cb-right { border-left: none !important; }
}

/* ── Smart Scan gradient ──────────────────────────────────────────────────── */
.mcc-smart-scan-gradient {
    background: linear-gradient(135deg, #6f42c1, #0d6efd) !important;
}

/* ── Messages: mobile list/detail stepper ─────────────────────────────────── */
@media (max-width: 767.98px) {
  #messagesRow.mobile-detail-open > .messages-thread-list-col { display: none !important; }
}

/* ── Coin browser: scrollable left nav (desktop) ──────────────────────────── */
@media (min-width: 768px) {
    .cb-left {
        max-height: 68vh;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: var(--bs-border-color) transparent;
    }
}

/* ── Coin browser: series search ──────────────────────────────────────────── */
#seriesSearch .input-group-text {
    background: transparent;
    border-right: none;
}
#seriesSearch .form-control {
    border-left: none;
}
#seriesSearch .form-control:focus {
    box-shadow: none;
    border-color: var(--bs-border-color);
}

/* ── Coin browser: series card coin count badge ───────────────────────────── */
.series-coin-count-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--bs-secondary-color);
    background: rgba(46, 44, 41, 0.07);
    border-radius: 2rem;
    padding: 0.1rem 0.45rem;
    white-space: nowrap;
}
.series-card.active-series .series-coin-count-badge {
    background: rgba(13, 110, 253, 0.10);
    color: var(--bs-primary);
}

/* ── Coin browser: action column buttons ──────────────────────────────────── */
.coin-row-actions {
    white-space: nowrap;
}
.cb-action-btn {
    font-size: 0.78rem;
    padding: 0.18rem 0.45rem;
    line-height: 1.4;
}
/* Minimum tap target on mobile */
@media (max-width: 767.98px) {
    .cb-action-btn {
        min-height: 36px;
        padding: 0.35rem 0.6rem;
    }
    .cb-signin-btn {
        min-height: 36px;
        padding: 0.35rem 0.6rem;
    }
}
/* Sign-in CTA */
.cb-signin-btn {
    font-size: 0.78rem;
    padding: 0.18rem 0.45rem;
    line-height: 1.4;
    white-space: nowrap;
}