/* =====================================================
   DEGIRO PORTFOLIO BEREKENEN
   ===================================================== */

/* Brede container voor deze tool (overschrijft base.css .container) */
.degiro-page .container {
  max-width: 1100px;
}

/* ── Intro ─────────────────────────────────────────────────────────────────── */
.degiro-subtitle {
  font-size: .875rem;
  color: var(--text-muted);
  margin: .35rem 0 1.5rem;
  line-height: 1.5;
}

/* ── Privacy-melding ───────────────────────────────────────────────────────── */
.degiro-privacy {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  background: rgba(43, 158, 173, .08);
  border: 1px solid rgba(43, 158, 173, .25);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  margin-bottom: 1.5rem;
  font-size: .8125rem;
  color: var(--text);
  line-height: 1.55;
}
.degiro-privacy__icon {
  flex-shrink: 0;
  font-size: 1.1rem;
  margin-top: .05rem;
}
.degiro-privacy strong { color: var(--text); }

/* ── Upload area ───────────────────────────────────────────────────────────── */
.upload-area {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  max-width: 440px;
  background: rgba(255, 255, 255, .55);
}
.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--pop);
  background: rgba(255, 255, 255, .85);
}
.upload-area__icon { font-size: 2rem; margin-bottom: .5rem; }
.upload-area__hint { color: var(--text-muted); font-size: .8rem; margin-top: .5rem; }

/* Upload-knop */
.btn-upload {
  display: inline-block;
  background: var(--pop);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: .5rem 1.2rem;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s;
  font-family: inherit;
}
.btn-upload:hover { background: var(--pop-hover); }

/* ── Status ────────────────────────────────────────────────────────────────── */
.degiro-status {
  margin-top: .75rem;
  font-size: .8rem;
  color: var(--text-muted);
  min-height: 1.3rem;
  line-height: 1.5;
}
.degiro-status.error { color: #d94f4f; }

/* ── Tutorial ──────────────────────────────────────────────────────────────── */
.tutorial {
  margin-top: 1.25rem;
  max-width: 640px;
}
.tutorial summary {
  cursor: pointer;
  font-size: .8375rem;
  font-weight: 600;
  color: var(--accent);
  list-style: none;
  display: flex;
  align-items: center;
  gap: .4rem;
  user-select: none;
}
.tutorial summary::-webkit-details-marker { display: none; }
.tutorial summary::before {
  content: '▶';
  font-size: .6rem;
  transition: transform .2s;
  display: inline-block;
}
.tutorial[open] summary::before { transform: rotate(90deg); }

.tutorial__body {
  margin-top: .9rem;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, .65);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.tutorial__steps {
  list-style: none;
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.tutorial__steps li {
  counter-increment: steps;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  font-size: .8375rem;
  line-height: 1.55;
}
.tutorial__steps li::before {
  content: counter(steps);
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--pop);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  margin-top: .05rem;
}
.tutorial__steps li strong { color: var(--text); }
.tutorial__note {
  margin-top: .75rem;
  font-size: .775rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: .75rem;
}

/* ── Tabs ──────────────────────────────────────────────────────────────────── */
.degiro-tabs {
  display: flex;
  margin: 1.75rem 0 0;
  border-bottom: 1px solid var(--border);
}
.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  padding: .5rem 1.2rem;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color .12s, border-color .12s;
  font-family: inherit;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--pop); border-bottom-color: var(--pop); }

.tab-pane { display: none; }

/* ── Summary cards (donker widget) ────────────────────────────────────────── */
.summary-cards {
  display: flex;
  gap: 1px;
  margin: 1.25rem 0 1.5rem;
  background: rgba(0, 0, 0, .08);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  flex-wrap: wrap;
}
.summary-card {
  background: #343647;
  padding: .9rem 1.2rem;
  flex: 1;
  min-width: 140px;
}
.summary-card__label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #9a9bae;
  margin-bottom: .3rem;
  font-weight: 500;
}
.summary-card__value { font-size: 1.15rem; font-weight: 300; color: #fff; }

.pos     { color: #2ecc71; }
.neg     { color: #e74c3c; }
.neutral { color: #fff; }

/* ── Zoekbalk ──────────────────────────────────────────────────────────────── */
.search-wrap { margin-bottom: .75rem; }
.search-inp {
  background: rgba(255, 255, 255, .75);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: .4rem .75rem;
  font-size: .84rem;
  width: 260px;
  font-family: inherit;
  transition: border-color .12s;
}
.search-inp:focus { outline: 2px solid var(--pop); outline-offset: -1px; border-color: var(--pop); }
.search-inp::placeholder { color: #9a9bae; }

/* ── Tabel ─────────────────────────────────────────────────────────────────── */
.table-wrap {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden; /* geen scrollbar */
}

table { width: 100%; border-collapse: collapse; font-size: .83rem; }

thead th {
  text-align: left;
  padding: .55rem .65rem;
  background: #343647;
  color: #9a9bae;
  font-weight: 600;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}
thead th[data-sort] { cursor: pointer; user-select: none; }
thead th[data-sort]:hover { color: #c8c9d5; }

.sort-arr { font-size: .68rem; margin-left: 2px; opacity: .3; }
th[data-sort].sorted .sort-arr { opacity: 1; color: var(--pop); }

tbody tr { border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, .8); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(43, 158, 173, .06); }

td { padding: .5rem .65rem; white-space: nowrap; color: var(--text); }
td.col-name { white-space: normal; max-width: 200px; font-size: .8rem; }
td.isin-cell { color: #9a9bae; font-size: .7rem; font-family: monospace; }

.num  { text-align: right; }
.bold { font-weight: 600; }
.faint { color: #9a9bae; }
.muted { color: var(--text-muted); }
.currency-note { color: var(--text-muted); font-size: .7rem; }

tfoot tr { border-top: 2px solid var(--border); background: rgba(255,255,255,.65) !important; }
tfoot td { padding: .6rem .65rem; font-weight: 700; color: var(--text); }

.promo-note { color: #2ecc71; font-size: .75rem; margin-left: .5rem; font-weight: 400; }

.empty-note { text-align: center; color: #9a9bae; padding: 2rem; }

/* ── Ticker input ──────────────────────────────────────────────────────────── */
.ticker-inp {
  background: #fdfcfb;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: .2rem .4rem;
  font-size: .78rem;
  width: 78px;
  font-family: inherit;
  transition: border-color .12s;
}
.ticker-inp:focus { outline: 2px solid var(--pop); outline-offset: -1px; }

.btn-refresh {
  background: #e8e9f5;
  border: none;
  color: var(--accent);
  border-radius: var(--radius-sm);
  padding: .2rem .45rem;
  font-size: .75rem;
  cursor: pointer;
  font-family: inherit;
  transition: background .12s;
  margin-left: .2rem;
}
.btn-refresh:hover { background: #d9d8ea; }

/* ── Voetnoot tabel ────────────────────────────────────────────────────────── */
.tbl-note {
  color: #9a9bae;
  font-size: .72rem;
  margin-top: .5rem;
  letter-spacing: .01em;
}

/* ── Voetnoot gerealiseerd ─────────────────────────────────────────────────── */
.realized-note {
  color: var(--text-muted);
  font-size: .75rem;
  margin-top: .75rem;
  line-height: 1.55;
  background: rgba(255,255,255,.5);
  border-radius: var(--radius);
  padding: .65rem .9rem;
  border: 1px solid var(--border);
}

/* ── Spinner ───────────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 12px; height: 12px;
  border: 2px solid var(--border);
  border-top-color: var(--pop);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── FAQ ───────────────────────────────────────────────────────────────────── */
.faq { margin: 2rem 0; }
.faq h2 { margin-bottom: 1rem; }

.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:first-of-type { border-top: 1px solid var(--border); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: .9rem 0;
  font-weight: 600;
  font-size: .9rem;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--pop);
  font-weight: 400;
  transition: transform .2s;
}
.faq-item[open] summary::after {
  content: '−';
}
.faq-item__body {
  padding: 0 0 1rem;
  font-size: .875rem;
  color: var(--text);
  line-height: 1.65;
}
.faq-item__body p + p { margin-top: .6rem; }

/* ── Disclaimer ────────────────────────────────────────────────────────────── */
.degiro-disclaimer {
  background: rgba(255, 255, 255, .5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 1.5rem 0 2rem;
}
.degiro-disclaimer strong { color: var(--text); }

/* ══════════════════════════════════════════════════════
   RESPONSIEF: Kolommen verbergen (geen scrollbar)
   ══════════════════════════════════════════════════════ */

/* Onder 1080px: verberg ISIN, Ticker, GAK, Kostenbasis */
@media (max-width: 1079px) {
  .col-isin,
  .col-ticker,
  .col-avgprice,
  .col-cost { display: none; }
}

/* Onder 700px: verberg ook Waarde en Opbrengsten */
@media (max-width: 699px) {
  .col-value,
  .col-proceeds { display: none; }
  .search-inp { width: 100%; }
  td.col-name { max-width: 120px; }
}

/* Onder 500px: verberg ook Koers */
@media (max-width: 499px) {
  .col-price { display: none; }
}

/* Summary cards op smal scherm: 2 per rij */
@media (max-width: 500px) {
  .summary-card { min-width: calc(50% - 1px); }
}
