/* Tool-specific styles only - base styles are in tool-layout.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0a0a0a;
    color: #e5e7eb;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #141414;
    border-bottom: 1px solid #374151;
    z-index: 100;
}

    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

    margin-top: 60px;
    padding: 48px 24px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    max-width: 720px;
    margin: 0 auto;
}

.tool-main {
    flex: 1;
    padding: 32px 24px 120px;
}

.tool-container {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group > label,
.input-label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.text-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    width: 100%;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.text-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.text-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.text-input::placeholder {
    color: #6b7280;
}

.input-with-prefix,
.input-with-suffix {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 16px;
    font-size: 15px;
    font-weight: 500;
    color: #6b7280;
    pointer-events: none;
    z-index: 1;
}

.text-input-prefixed {
    padding-left: 32px;
}

.input-suffix {
    position: absolute;
    right: 16px;
    font-size: 15px;
    font-weight: 500;
    color: #6b7280;
    pointer-events: none;
    z-index: 1;
}

.text-input-suffixed {
    padding-right: 36px;
}

.input-error {
    font-size: 13px;
    color: #ef4444;
}

.text-input[type="number"]::-webkit-outer-spin-button,
.text-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.text-input[type="number"] {
    -moz-appearance: textfield;
}

.mode-toggle {
    display: flex;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
}

.mode-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.mode-btn:hover {
    color: #e5e7eb;
}

.mode-btn.active {
    background-color: #3b82f6;
    color: #ffffff;
}

.state-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.state-btn {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #e5e7eb;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    white-space: nowrap;
}

.state-btn:hover {
    background-color: #374151;
    border-color: #374151;
}

.state-btn.active {
    background-color: #646cff;
    border-color: #646cff;
    color: #ffffff;
}

.state-btn .state-rate {
    color: #6b7280;
    margin-left: 4px;
    font-weight: 400;
}

.state-btn.active .state-rate {
    color: rgba(255, 255, 255, 0.8);
}

.expand-states-btn {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding: 4px 0;
    transition: color 150ms ease;
    text-align: left;
}

.expand-states-btn:hover {
    color: #60a5fa;
}

.favorites-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 12px;
    margin-bottom: 4px;
    border-bottom: 1px solid #2a2a2a;
}

.favorites-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.favorites-label {
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.favorites-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.favorite-btn {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-left: 3px solid #646cff;
    color: #e5e7eb;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.favorite-btn:hover {
    background-color: #374151;
}

.favorite-btn .favorite-delete {
    display: none;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 150ms ease;
}

.favorite-btn:hover .favorite-delete {
    display: inline;
}

.favorite-btn .favorite-delete:hover {
    color: #ef4444;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.save-rate-row {
    display: flex;
}

.button-primary {
    background-color: #3b82f6;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
    flex: 1;
}

.button-secondary {
    background-color: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid #374151;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.button-text {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    transition: color 150ms ease;
}

.button-text:hover {
    color: #60a5fa;
}

.pro-badge {
    color: #0a0a0a;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.lock-icon {
    font-size: 10px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lock-icon.section-hidden {
    display: none;
}

.pro-feature-btn {
    position: relative;
}

.output-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.output-header h3 {
    font-size: 22px;
    font-weight: 600;
    line-height: 28px;
    color: #d1d5db;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
    padding: 20px 16px;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    transition: border-color 150ms ease;
}

.stat-card-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-value {
    font-size: 24px;
    font-weight: 700;
    color: #e5e7eb;
    line-height: 1.2;
}

.stat-card-value.stat-highlight {
    color: #10b981;
}

.stat-card-value.stat-total {
    color: #3b82f6;
}

.copy-row {
    display: flex;
}

.running-total-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.running-total-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.running-total-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: #d1d5db;
}

.table-wrapper {
    overflow-x: auto;
    border: 1px solid #374151;
    border-radius: 8px;
}

.running-total-table,
.batch-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.running-total-table thead,
.batch-table thead {
    background-color: #1a1a1a;
    position: sticky;
    top: 0;
}

.running-total-table th,
.batch-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #374151;
}

.running-total-table th:nth-child(n+3),
.batch-table th:nth-child(n+3) {
    text-align: right;
}

.running-total-table td,
.batch-table td {
    padding: 10px 16px;
    color: #e5e7eb;
    border-bottom: 1px solid #1a1a1a;
}

.running-total-table td:nth-child(n+3),
.batch-table td:nth-child(n+3) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.running-total-table tbody tr:nth-child(odd),
.batch-table tbody tr:nth-child(odd) {
    background-color: #141414;
}

.running-total-table tbody tr:nth-child(even),
.batch-table tbody tr:nth-child(even) {
    background-color: #0f0f0f;
}

.running-total-table tbody tr:hover,
.batch-table tbody tr:hover {
    background-color: #1a1a1a;
}

.summary-row td {
    padding: 14px 16px;
    font-weight: 600;
    color: #ffffff;
    border-top: 2px solid #374151;
    border-bottom: none;
    background-color: #141414;
}

.item-remove-btn {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    transition: color 150ms ease;
    line-height: 1;
}

.item-remove-btn:hover {
    color: #ef4444;
}

.batch-table tbody tr.batch-error-row {
    border-left: 3px solid #ef4444;
}

.batch-table tbody tr.batch-error-row td {
    color: #fca5a5;
}

.batch-status-ok {
    color: #10b981;
    font-weight: 500;
    font-size: 12px;
}

.batch-status-error {
    color: #ef4444;
    font-weight: 500;
    font-size: 12px;
}

.pro-section {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.pro-feature-block {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pro-feature-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pro-feature-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #d1d5db;
}

.pro-feature-desc {
    font-size: 14px;
    color: #9ca3af;
    line-height: 1.5;
}

.batch-upload-area {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.batch-filename {
    font-size: 13px;
    color: #9ca3af;
}

.batch-count {
    font-size: 13px;
    color: #9ca3af;
}

.batch-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-top: 1px solid #374151;
    padding-top: 16px;
}

.batch-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.batch-results-header h4 {
    font-size: 16px;
    font-weight: 500;
    color: #d1d5db;
}

.jurisdiction-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.jurisdiction-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.jurisdiction-row > label {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
}

.jurisdiction-combined {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background-color: #1a1a1a;
    border-radius: 6px;
}

.jurisdiction-combined-label {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
}

.jurisdiction-combined-value {
    font-size: 16px;
    font-weight: 600;
    color: #3b82f6;
}

.jurisdiction-breakdown {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.jurisdiction-bar {
    display: flex;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    background-color: #1a1a1a;
}

.jurisdiction-bar-segment {
    height: 100%;
    transition: width 300ms ease;
}

.jurisdiction-bar-segment.state-segment {
    background-color: #3b82f6;
}

.jurisdiction-bar-segment.county-segment {
    background-color: #8b5cf6;
}

.jurisdiction-bar-segment.city-segment {
    background-color: #06b6d4;
}

.jurisdiction-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jurisdiction-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: #1a1a1a;
    border-radius: 6px;
}

.jurisdiction-detail-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #e5e7eb;
}

.jurisdiction-detail-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.jurisdiction-detail-dot.state-dot {
    background-color: #3b82f6;
}

.jurisdiction-detail-dot.county-dot {
    background-color: #8b5cf6;
}

.jurisdiction-detail-dot.city-dot {
    background-color: #06b6d4;
}

.jurisdiction-detail-value {
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
    font-variant-numeric: tabular-nums;
}

.jurisdiction-detail-row.jurisdiction-total-row {
    border-top: 1px solid #374151;
    margin-top: 4px;
}

.jurisdiction-total-row .jurisdiction-detail-label {
    font-weight: 600;
    color: #ffffff;
}

.jurisdiction-total-row .jurisdiction-detail-value {
    color: #ffffff;
}

.comparison-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comparison-rate-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comparison-rate-row > label {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    min-width: 48px;
    flex-shrink: 0;
}

.comparison-rate-row .input-with-suffix {
    flex: 1;
}

.comparison-rate-row .comparison-label-input {
    flex: 1;
    padding: 10px 12px;
    font-size: 13px;
}

.comparison-remove-btn {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    transition: color 150ms ease;
    flex-shrink: 0;
}

.comparison-remove-btn:hover {
    color: #ef4444;
}

.comparison-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comparison-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    transition: border-color 150ms ease;
}

.comparison-card.comparison-lowest {
    border-color: #059669;
}

.comparison-card.comparison-highest {
    border-color: #dc2626;
}

.comparison-card-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.comparison-card-label {
    font-size: 13px;
    color: #9ca3af;
}

.comparison-card-rate {
    font-size: 18px;
    font-weight: 600;
    color: #e5e7eb;
}

.comparison-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.comparison-card-tax {
    font-size: 14px;
    color: #9ca3af;
}

.comparison-card-total {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.comparison-tag {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 4px;
}

.comparison-tag-lowest {
    background-color: #064e3b;
    color: #6ee7b7;
}

.comparison-tag-highest {
    background-color: #7f1d1d;
    color: #fca5a5;
}

.export-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.pro-cta-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.pro-cta-text {
    font-size: 14px;
    color: #d1d5db;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

.modal-overlay.modal-hidden {
    display: none;
}

.modal-overlay.modal-visible {
    display: flex;
}

.modal {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 0;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #e5e7eb;
}

.modal-content {
    padding: 24px;
}

.modal-feature-context {
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 16px;
    line-height: 1.5;
}

.pro-features-list {
    margin-bottom: 24px;
}

.pro-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.feature-check {
    width: 20px;
    height: 20px;
    background-color: #059669;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.feature-text {
    font-size: 15px;
    color: #e5e7eb;
}

.modal-cta {
    width: 100%;
    display: block;
}

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 300;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: opacity 300ms ease, transform 300ms ease;
}

.toast.toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.toast-success {
    border-color: #059669;
}

.toast.toast-error {
    border-color: #dc2626;
}

.footer {
    background-color: #0a0a0a;
    border-top: 1px solid #374151;
    padding: 32px 24px;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 14px;
    color: #6b7280;
}

.error-message {
    background-color: #7f1d1d;
    border: 1px solid #dc2626;
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

.success-message {
    background-color: #064e3b;
    border: 1px solid #059669;
    color: #6ee7b7;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

@media (max-width: 768px) {
        padding: 32px 16px;
    }

        font-size: 28px;
        line-height: 36px;
    }

        font-size: 14px;
    }

    .tool-main {
        padding: 24px 16px 100px;
    }

    .tool-container {
        gap: 32px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }

    .stat-card {
        padding: 16px 12px;
    }

    .stat-card-value {
        font-size: 20px;
    }

    .output-section {
        padding: 16px;
    }

    .pro-feature-block {
        padding: 16px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .button-primary,
    .button-secondary {
        width: 100%;
    }

    .state-buttons {
        gap: 6px;
    }

    .state-btn {
        padding: 5px 10px;
        font-size: 11px;
    }

    .comparison-rate-row {
        flex-wrap: wrap;
    }

    .comparison-rate-row > label {
        min-width: 100%;
    }

    .export-buttons {
        flex-direction: column;
    }

    .pro-cta-content {
        flex-direction: column;
        gap: 10px;
    }

        padding: 0 16px;
    }

    .comparison-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .comparison-card-right {
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card-value {
        font-size: 18px;
    }

    .batch-upload-area {
        flex-direction: column;
        align-items: stretch;
    }

    .jurisdiction-row {
        gap: 4px;
    }
}