/* TBOL Budget Tracker Styles */
.tbol-budget-tracker {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
}

.tbol-budget-tracker * {
    box-sizing: border-box;
}

/* PDF-only elements - hidden on site */
.tbol-pdf-only {
    display: none;
}

/* Header */
.tbol-header {
    text-align: center;
    margin-bottom: 30px;
}

.tbol-logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 15px;
}

.tbol-header h2 {
	font-family: 'open sans', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #000;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tbol-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Sections */
.tbol-section {
    margin-bottom: 24px;
}

.tbol-section-header {
    padding: 12px 16px;
    margin-bottom: 0;
}

.tbol-section-header--primary {
    background-color: #000;
    color: #fff;
}

.tbol-section-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff !important;
}

/* Categories */
.tbol-category {
    border: 1px solid #ddd;
    border-top: none;
    margin-bottom: 16px;
}

.tbol-category:last-child {
    margin-bottom: 0;
}

.tbol-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background-color: #e8e8e3;
    font-weight: 600;
    font-size: 14px;
    color: #000;
    border-bottom: 1px solid #ddd;
}

/* Items */
.tbol-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #eee;
}

.tbol-item:last-of-type {
    border-bottom: none;
}

.tbol-item label {
    flex: 1;
    font-size: 14px;
    color: #333;
    padding-right: 12px;
}

/* Input wrapper */
.tbol-input-wrap {
    display: flex;
    align-items: center;
    background-color: #fffde7;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 8px;
    min-width: 120px;
}

.tbol-currency {
    color: #666;
    font-size: 14px;
    margin-right: 4px;
}

.tbol-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 8px 0;
    font-size: 14px;
    text-align: right;
    color: #000;
    -moz-appearance: textfield;
}

.tbol-input::-webkit-outer-spin-button,
.tbol-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tbol-input:focus {
    outline: none;
}

.tbol-input-wrap:focus-within {
    border-color: #b5b5aa;
    box-shadow: 0 0 0 2px rgba(181, 181, 170, 0.3);
}

/* Totals */
.tbol-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #b5b5aa;
    font-weight: 600;
    font-size: 14px;
    color: #000;
}

.tbol-total-value {
    min-width: 100px;
    text-align: right;
}

/* Summary */
.tbol-summary {
    border: 1px solid #ddd;
    border-top: none;
}

.tbol-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
}

.tbol-summary-row:last-child {
    border-bottom: none;
}

.tbol-summary-row--position {
    background-color: #b5b5aa;
    font-size: 18px;
}

.tbol-summary-value {
    min-width: 120px;
    text-align: right;
}

.tbol-summary-value--position {
    font-size: 20px;
}

/* Position colours */
.tbol-positive .tbol-summary-value--position {
    color: #2e7d32;
}

.tbol-negative .tbol-summary-value--position {
    color: #c62828;
}

/* Disclaimer */
.tbol-disclaimer {
    margin-top: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.5;
    color: #666;
}

.tbol-disclaimer p {
    margin: 0 0 10px 0;
}

.tbol-disclaimer p:last-child {
    margin-bottom: 0;
}

.tbol-disclaimer strong {
    color: #333;
}

/* PDF Footer */
.tbol-pdf-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.tbol-pdf-footer p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #666;
}

.tbol-pdf-footer p:last-child {
    margin-bottom: 0;
    font-style: italic;
}

.tbol-pdf-footer a {
    color: #000;
    text-decoration: underline;
    font-weight: 600;
}

/* Actions */
.tbol-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.tbol-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tbol-btn--reset {
    background-color: #fff;
    color: #333;
    border: 2px solid #ddd;
}

.tbol-btn--reset:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.tbol-btn--print {
    background-color: #000;
    color: #fff;
}

.tbol-btn--print:hover {
    background-color: #333;
}

/* Site Footer */
.tbol-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.tbol-footer p {
    margin: 0;
}

.tbol-footer a {
    color: #000;
    text-decoration: underline;
    font-weight: 600;
}

.tbol-footer a:hover {
    color: #333;
}

/* Mobile adjustments */
@media screen and (max-width: 480px) {
    .tbol-budget-tracker {
        padding: 12px;
    }

    .tbol-header h2 {
        font-size: 22px;
    }

    .tbol-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px 16px;
    }

    .tbol-item label {
        padding-right: 0;
    }

    .tbol-input-wrap {
        min-width: 100%;
    }

    .tbol-category-header span:last-child {
        display: none;
    }

    .tbol-summary-row--position {
        font-size: 16px;
    }

    .tbol-summary-value--position {
        font-size: 18px;
    }

    .tbol-actions {
        flex-direction: column;
    }

    .tbol-btn {
        width: 100%;
    }
}

/* Print styles */
@media print {
    .tbol-budget-tracker {
        max-width: 100%;
        padding: 0;
    }

    .tbol-actions {
        display: none !important;
    }

    .tbol-site-only {
        display: none !important;
    }

    .tbol-pdf-only {
        display: block !important;
    }
}
