/* ─────────────────────────────────────────────
 * Traditions Bar Calculator – Frontend Styles
 * Brand: Black + Gold (#CEB35A)
 * ───────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Actor&family=Bellefair&display=swap');

/* Reset & Container */
.tbc-calculator {
    --tbc-gold: #CEB35A;
    --tbc-gold-light: #e0cc7a;
    --tbc-gold-dark: #b59a3e;
    --tbc-black: #1a1a1a;
    --tbc-dark: #242424;
    --tbc-card: #2c2c2c;
    --tbc-border: #3a3a3a;
    --tbc-text: #f0ece2;
    --tbc-muted: #a8a8a8;
    --tbc-radius: 12px;

    font-family: Actor, Helvetica, Arial, Lucida, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    color: var(--tbc-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
.tbc-calculator *, .tbc-calculator *::before, .tbc-calculator *::after {
    box-sizing: border-box;
}

/* Sections */
.tbc-section {
    background: #000000;
    border: 1px solid var(--tbc-gold-dark);
    border-radius: var(--tbc-radius);
    padding: 36px 40px;
    margin-bottom: 24px;
}
@media (max-width: 600px) {
    .tbc-section { padding: 24px 20px; }
}

/* Headings */
.tbc-heading {
    font-size: 26px;
    font-weight: 700;
    color: var(--tbc-gold);
    margin: 0 0 4px;
    letter-spacing: -0.3px;
}
.tbc-subheading {
    color: rgb(255, 207, 154);
    font-size: 14px;
    font-weight: 500;
    font-style: normal;
    font-family: Bellefair, Georgia, 'Times New Roman', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 28px;
}

/* Fields */
.tbc-field {
    margin-bottom: 24px;
}
.tbc-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--tbc-text);
    margin-bottom: 8px;
}
.tbc-label strong {
    color: var(--tbc-gold);
    font-weight: 700;
}

/* Number Input + Buttons */
.tbc-number-wrap {
    display: inline-flex;
    align-items: center;
    background: var(--tbc-card);
    border: 1px solid var(--tbc-border);
    border-radius: 8px;
    overflow: hidden;
}
.tbc-num-btn {
    background: transparent;
    border: none;
    color: var(--tbc-gold);
    font-size: 20px;
    font-weight: 700;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    line-height: 1;
}
.tbc-num-btn:hover {
    background: rgba(206,179,90,0.12);
}
.tbc-number-input {
    width: 72px;
    text-align: center;
    background: transparent;
    border: none;
    border-left: 1px solid var(--tbc-border);
    border-right: 1px solid var(--tbc-border);
    color: var(--tbc-text);
    font-size: 16px;
    font-weight: 600;
    height: 44px;
    padding: 0;
    -moz-appearance: textfield;
}
.tbc-number-input::-webkit-outer-spin-button,
.tbc-number-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.tbc-number-input:focus {
    outline: none;
    background: rgba(206,179,90,0.06);
}

/* Radio Buttons */
.tbc-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tbc-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 14px;
    background: var(--tbc-card);
    border: 1px solid var(--tbc-border);
    border-radius: 8px;
    transition: border-color 0.15s, background 0.15s;
}
.tbc-radio:hover {
    border-color: var(--tbc-gold-dark);
}
.tbc-radio input[type="radio"] {
    display: none;
}
.tbc-radio-mark {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--tbc-border);
    background: transparent;
    position: relative;
    transition: border-color 0.15s;
}
.tbc-radio-mark::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--tbc-gold);
    transform: scale(0);
    transition: transform 0.15s;
}
.tbc-radio input[type="radio"]:checked ~ .tbc-radio-mark {
    border-color: var(--tbc-gold);
}
.tbc-radio input[type="radio"]:checked ~ .tbc-radio-mark::after {
    transform: scale(1);
}
.tbc-radio input[type="radio"]:checked ~ .tbc-radio-text {
    color: var(--tbc-gold-light);
}
.tbc-radio-text {
    font-size: 14px;
    color: var(--tbc-text);
    transition: color 0.15s;
}

/* Range Slider */
.tbc-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--tbc-border);
    outline: none;
    margin-top: 4px;
}
.tbc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--tbc-gold);
    cursor: pointer;
    border: 3px solid var(--tbc-dark);
    box-shadow: 0 0 0 2px var(--tbc-gold-dark);
    transition: box-shadow 0.15s;
}
.tbc-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 4px rgba(206,179,90,0.25);
}
.tbc-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--tbc-gold);
    cursor: pointer;
    border: 3px solid var(--tbc-dark);
    box-shadow: 0 0 0 2px var(--tbc-gold-dark);
}

/* Percentage Tracker */
.tbc-pct-tracker {
    margin-top: 8px;
    margin-bottom: 8px;
}
.tbc-pct-bar-wrap {
    width: 100%;
    height: 8px;
    background: var(--tbc-border);
    border-radius: 4px;
    overflow: hidden;
}
.tbc-pct-bar {
    height: 100%;
    border-radius: 4px;
    background: var(--tbc-gold);
    transition: width 0.25s ease, background 0.25s ease;
    width: 0%;
}
.tbc-pct-bar.tbc-over {
    background: #d35f5f;
}
.tbc-pct-bar.tbc-exact {
    background: #4caf50;
}
.tbc-pct-status {
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
    color: var(--tbc-muted);
}
.tbc-pct-status.tbc-status-over {
    color: #e07a7a;
}
.tbc-pct-status.tbc-status-under {
    color: var(--tbc-gold-light);
}

/* Percentage Warning */
.tbc-warning {
    background: rgba(206,179,90,0.1);
    border: 1px solid var(--tbc-gold-dark);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--tbc-gold-light);
    margin-top: 8px;
}

/* Placeholder message */
.tbc-placeholder {
    text-align: center;
    padding: 32px 20px;
}
.tbc-placeholder p {
    color: var(--tbc-muted);
    font-size: 15px;
    margin: 0;
    font-style: italic;
}

/* ───── RESULTS ───── */
.tbc-result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
@media (max-width: 540px) {
    .tbc-result-grid { grid-template-columns: 1fr; }
}
.tbc-result-card {
    background: var(--tbc-card);
    border: 1px solid var(--tbc-border);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.2s, transform 0.2s;
}
.tbc-result-card:hover {
    border-color: var(--tbc-gold-dark);
    transform: translateY(-2px);
}
.tbc-result-icon {
    font-size: 28px;
    margin-bottom: 6px;
}
.tbc-result-label {
    font-size: 14px;
    color: rgb(255, 207, 154);
    font-weight: 500;
    font-style: normal;
    font-family: Bellefair, Georgia, 'Times New Roman', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.tbc-result-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--tbc-text);
    line-height: 1.2;
}
.tbc-result-cost {
    font-size: 14px;
    color: var(--tbc-gold);
    margin-top: 4px;
    font-weight: 500;
}
.tbc-result-hint {
    font-size: 11px;
    color: #ffffff;
    margin-top: 8px;
    font-style: italic;
    line-height: 1.4;
    opacity: 0.85;
}

/* Total Bar */
.tbc-total-bar {
    background: linear-gradient(135deg, var(--tbc-gold-dark) 0%, var(--tbc-gold) 100%);
    border-radius: 10px;
    padding: 20px 24px;
    color: var(--tbc-black);
}
.tbc-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}
.tbc-total-label {
    font-size: 14px;
    font-weight: 500;
}
.tbc-total-value {
    font-size: 18px;
    font-weight: 700;
}
.tbc-grand-total .tbc-total-label {
    font-size: 18px;
    font-weight: 400;
    font-style: normal;
    font-family: Bellefair, Georgia, 'Times New Roman', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #000000;
    -webkit-text-stroke: 0.6px #000000;
}
.tbc-grand-total .tbc-total-value {
    font-size: 28px;
    font-family: Bellefair, Georgia, 'Times New Roman', serif;
    color: #000000;
}
