/* Gold Price Calculator — calculator.css */

/* ── Wrapper ── */
.gpc-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: #1a1a1a;
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* ── Price Bar ── */
.gpc-price-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 1.25rem;
}

.gpc-pb-item {
    background: #f7f6f1;
    border: 1px solid #e8e4d8;
    border-radius: 8px;
    padding: 10px 12px;
}

.gpc-pb-label {
    display: block;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0 0 4px;
}

.gpc-pb-val {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

/* ── Main Form Card ── */
.gpc-form {
    background: #ffffff;
    border: 1px solid #e0ddd4;
    border-radius: 12px;
    padding: 1.5rem;
}

/* ── Rows ── */
.gpc-row {
    margin-bottom: 1.25rem;
}

.gpc-row label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 8px;
}

/* ── Quantity Input ── */
#gpc-qty {
    width: 100%;
    max-width: 220px;
    padding: 9px 12px;
    border: 1px solid #d8d4c8;
    border-radius: 8px;
    font-size: 15px;
    color: #1a1a1a;
    background: #fafaf7;
    outline: none;
    transition: border-color .15s;
    -moz-appearance: textfield;
}

#gpc-qty:focus {
    border-color: #b8965a;
    background: #fff;
}

#gpc-qty::-webkit-inner-spin-button,
#gpc-qty::-webkit-outer-spin-button {
    opacity: 1;
}

/* ── Button Groups ── */
.gpc-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gpc-btn {
    background: #f4f2eb;
    border: 1px solid #ddd9cc;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    font-family: inherit;
    color: #444;
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
    line-height: 1.4;
}

.gpc-btn:hover {
    background: #ede9de;
    border-color: #c8b882;
}

.gpc-btn.active {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #f5e6a0;
    font-weight: 600;
}

/* ── Result Box ── */
.gpc-result {
    background: #1a1a1a;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
}

.gpc-result-label {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0 0 6px;
}

.gpc-result-total {
    font-size: 36px;
    font-weight: 700;
    color: #f5e6a0;
    margin: 0 0 6px;
    letter-spacing: -.01em;
}

.gpc-result-breakdown {
    font-size: 13px;
    color: #888;
    margin: 0;
}

/* ── Divider ── */
.gpc-divider {
    border: none;
    border-top: 1px solid #ede9de;
    margin: 1.25rem 0;
}

/* ── Sub-section Label ── */
.gpc-sub-label {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: 0 0 10px;
}

/* ── Unit Price Grid ── */
.gpc-unit-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: .5rem;
}

.gpc-unit-item {
    background: #f7f6f1;
    border: 1px solid #e8e4d8;
    border-radius: 8px;
    padding: 10px 12px;
}

.gpc-unit-item span {
    display: block;
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
}

.gpc-unit-item strong {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

/* ── Footer ── */
.gpc-updated {
    font-size: 12px;
    color: #aaa;
    margin: 1rem 0 4px;
}

.gpc-attribution {
    font-size: 12px;
    color: #aaa;
    margin: 0;
}

.gpc-attribution a {
    color: #b8965a;
    text-decoration: none;
}

.gpc-attribution a:hover {
    text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .gpc-price-bar {
        grid-template-columns: repeat(3, 1fr);
    }

    .gpc-unit-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gpc-result-total {
        font-size: 28px;
    }
}

@media (max-width: 400px) {
    .gpc-price-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* Specific layout for the Ticker View */
.ticker-layout {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.ticker-layout .gpc-pb-item {
    background: #fff;
    border: 2px solid #f2e8cf; /* Light gold border */
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.ticker-layout .gpc-pb-val {
    font-size: 20px;
    color: #b8860b; /* Dark Goldenrod */
}