/*
 * /buy-osrs-gold blocks rendered by App\View\Components\GoldPageSection:
 * OSRS Gold Price Today, the cards to other pages and the homepage link. Loaded only where one of those blocks is on the page.
 */

/* ---------- OSRS Gold Price Today ---------- */
.gold-today {
    margin: 56px auto 0;
    max-width: 1100px;
    font-family: Epilogue, sans-serif;
    color: #e6e6e2;
}

.gold-today__title {
    margin: 0 0 12px;
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.gold-today .y { color: #FFC43A; }
.gold-today .g { color: #20D420; }

.gold-today__lead {
    max-width: 760px;
    margin: 0 auto 24px;
    color: #bdbdbd;
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
}

.gold-today__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.gold-today__card {
    min-width: 0;
}

.gold-today__table {
    width: 100%;
    border: 1px solid #2e2e2e;
    border-radius: 14px;
    border-collapse: separate;
    border-spacing: 0;
    background: #1a1a1a;
    font-size: 14.5px;
    line-height: 1.45;
    overflow: hidden;
}

.gold-today__table caption {
    padding: 0 4px 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-align: left;
}

.gold-today__table th,
.gold-today__table td {
    padding: 12px 16px;
    border-bottom: 1px solid #2e2e2e;
    text-align: left;
    vertical-align: top;
}

.gold-today__table thead th {
    background: #232323;
    color: #bdbdbd;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.gold-today__table tbody tr:last-child > * { border-bottom: 0; }
.gold-today__table tbody th { color: #fff; font-weight: 600; white-space: nowrap; }
.gold-today__table tbody td { color: #e6e6e2; }
.gold-today__table tbody td.is-bonus { color: #20D420; font-weight: 600; }
.gold-today__table tbody td.is-none { color: #6f6f6f; }
.gold-today__table tbody tr:hover > * { background-color: rgba(255, 255, 255, 0.03); }

.gold-today__table--facts tbody th { width: 38%; white-space: normal; }

.gold-today__answers {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 16px;
}

.gold-today__answer {
    padding: 18px 20px;
    border: 1px solid #2e2e2e;
    border-radius: 14px;
    background: #1a1a1a;
}

.gold-today__answer h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.gold-today__answer p {
    margin: 0;
    color: #bdbdbd;
    font-size: 14.5px;
    line-height: 1.6;
}

.gold-today__answer a {
    color: #FFC43A;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (min-width: 900px) {
    .gold-today__title { font-size: 30px; }
    .gold-today__grid { grid-template-columns: 1fr 1.15fr; align-items: start; }
    .gold-today__answers { grid-template-columns: 1fr 1fr; }
}

/* Phones: no table wider than the screen. */
@media (max-width: 480px) {
    .gold-today { margin-top: 40px; }
    .gold-today__title { font-size: 22px; }
    .gold-today__lead { font-size: 14.5px; text-align: left; }
    .gold-today__table th,
    .gold-today__table td { padding: 10px 12px; font-size: 14px; }
    .gold-today__table thead th { font-size: 11.5px; }
    .gold-today__table--facts tbody th { width: 34%; }
}

/* ---------- Cards to other pages ---------- */
.gold-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 1100px;
    margin: 24px auto 0;
    font-family: Epilogue, sans-serif;
}

.gold-links__card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 44px 16px 16px;
    border: 1px solid #2e2e2e;
    border-radius: 14px;
    background: #1a1a1a;
    color: #bdbdbd;
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.gold-links__img {
    flex: none;
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.gold-links__copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.gold-links__card:hover,
.gold-links__card:focus-visible {
    border-color: #FFC43A;
    background: #201d14;
}

.gold-links__title {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
}

.gold-links__text {
    font-size: 14px;
    line-height: 1.5;
}

.gold-links__text .g { color: #20D420; }

.gold-links__arrow {
    position: absolute;
    top: 50%;
    right: 20px;
    color: #FFC43A;
    font-size: 20px;
    transform: translateY(-50%);
}

@media (min-width: 768px) {
    .gold-links { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Homepage link to /buy-osrs-gold ---------- */
.home-gold-link {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 12px;
    margin: 0 auto;
    padding: 0 24px 16px;
    font-family: Epilogue, sans-serif;
    text-align: center;
}

.home-gold-link a {
    color: #FFC43A;
    font-size: 16px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.home-gold-link__note {
    color: #9a9a9a;
    font-size: 14px;
}
