/* 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 {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.select-input {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

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

.select-input option {
    background-color: #1a1a1a;
}

.select-input optgroup {
    background-color: #1a1a1a;
    color: #9ca3af;
    font-weight: 600;
}

.text-input {
    background-color: #141414;
    border: 1px solid #2a2a2a;
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    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;
}

.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;
}

.input-hint {
    font-size: 13px;
    color: #6b7280;
}

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

.button-group {
    display: flex;
    gap: 12px;
}

.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 #2a2a2a;
    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;
}

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

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

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

.stat-card:hover {
    border-color: #374151;
}

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

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

.cost-breakdown {
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 24px;
}

.breakdown-title {
    font-size: 16px;
    font-weight: 600;
    color: #d1d5db;
    margin-bottom: 16px;
}

.breakdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #2a2a2a;
}

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

.breakdown-label {
    font-size: 14px;
    color: #9ca3af;
}

.breakdown-value {
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.copy-section {
    display: flex;
}

.pro-features-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid #2a2a2a;
}

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

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

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

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

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

.lock-icon {
    font-size: 11px;
    font-weight: 700;
    color: #f59e0b;
    letter-spacing: 0.5px;
}

.lock-icon.unlocked {
    color: #10b981;
}

.comparison-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.input-row .input-group {
    flex: 1;
    min-width: 100px;
}

.input-row .input-group:first-child {
    flex: 2;
    min-width: 160px;
}

.input-row .input-group > label {
    font-size: 12px;
}

.input-row .text-input {
    padding: 10px 12px;
    font-size: 14px;
}

.comparison-table-wrapper {
    overflow-x: auto;
    margin-top: 8px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.comparison-table th {
    text-align: left;
    padding: 10px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #2a2a2a;
    white-space: nowrap;
    user-select: none;
}

.comparison-table th.sortable {
    cursor: pointer;
    transition: color 150ms ease;
}

.comparison-table th.sortable:hover {
    color: #e5e7eb;
}

.comparison-table th.sort-active {
    color: #3b82f6;
}

.comparison-table th.sort-active::after {
    content: ' \25B2';
    font-size: 9px;
}

.comparison-table th.sort-active.sort-desc::after {
    content: ' \25BC';
}

.comparison-table td {
    padding: 10px 8px;
    color: #e5e7eb;
    border-bottom: 1px solid #1a1a1a;
    font-variant-numeric: tabular-nums;
}

.comparison-table tbody tr {
    transition: background-color 150ms ease;
}

.comparison-table tbody tr:nth-child(odd) {
    background-color: #141414;
}

.comparison-table tbody tr:nth-child(even) {
    background-color: #1a1a1a;
}

.comparison-table tbody tr:hover {
    background-color: #252525;
}

.comparison-table tbody tr.row-most-expensive {
    border-left: 3px solid #ef4444;
}

.comparison-table tbody tr.row-least-expensive {
    border-left: 3px solid #22c55e;
}

.comparison-table tfoot td {
    padding: 12px 8px;
    font-weight: 600;
    color: #ffffff;
    border-top: 2px solid #2a2a2a;
    border-bottom: none;
}

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

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

.comparison-chart {
    margin-top: 8px;
}

.comparison-chart h4 {
    font-size: 14px;
    font-weight: 600;
    color: #d1d5db;
    margin-bottom: 12px;
}

.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chart-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chart-bar-label {
    font-size: 13px;
    color: #9ca3af;
    width: 120px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-bar-track {
    flex: 1;
    height: 24px;
    background-color: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.chart-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 4px;
    transition: width 300ms ease;
    min-width: 2px;
}

.chart-bar-fill.bar-most-expensive {
}

.chart-bar-fill.bar-least-expensive {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.chart-bar-amount {
    font-size: 13px;
    font-weight: 600;
    color: #e5e7eb;
    width: 80px;
    text-align: right;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.tiered-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tiered-mode-toggle {
    display: flex;
    align-items: center;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #e5e7eb;
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-switch {
    width: 40px;
    height: 22px;
    background-color: #374151;
    border-radius: 11px;
    position: relative;
    transition: background-color 150ms ease;
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background-color: #e5e7eb;
    border-radius: 50%;
    transition: transform 150ms ease;
}

.toggle-label input[type="checkbox"]:checked + .toggle-switch {
    background-color: #3b82f6;
}

.toggle-label input[type="checkbox"]:checked + .toggle-switch::after {
    transform: translateX(18px);
}

.tiered-editor {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tier-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tier-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
}

.tier-row-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    width: 50px;
    flex-shrink: 0;
}

.tier-row-fields {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.tier-row-fields .text-input {
    padding: 8px 10px;
    font-size: 13px;
    width: 100px;
}

.tier-row-fields span {
    font-size: 13px;
    color: #6b7280;
    white-space: nowrap;
}

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

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

.tier-breakdown {
    margin-top: 8px;
}

.tier-breakdown h4 {
    font-size: 14px;
    font-weight: 600;
    color: #d1d5db;
    margin-bottom: 12px;
}

.tier-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.tier-breakdown-table th {
    text-align: left;
    padding: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #2a2a2a;
}

.tier-breakdown-table td {
    padding: 8px;
    color: #e5e7eb;
    border-bottom: 1px solid #1a1a1a;
    font-variant-numeric: tabular-nums;
}

.tier-breakdown-table tfoot td {
    border-top: 2px solid #2a2a2a;
    border-bottom: none;
    padding: 10px 8px;
}

.tier-breakdown-table tfoot strong {
    color: #ffffff;
}

.calendar-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.month-overrides h4 {
    font-size: 14px;
    font-weight: 600;
    color: #d1d5db;
    margin-bottom: 12px;
}

.month-override-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.month-override-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.month-override-item label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
}

.month-override-input {
    background-color: #0a0a0a;
    border: 1px solid #2a2a2a;
    color: #e5e7eb;
    padding: 8px 4px;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    text-align: center;
    outline: none;
    width: 100%;
    transition: border-color 150ms ease;
}

.month-override-input:focus {
    border-color: #3b82f6;
}

.month-override-input::placeholder {
    color: #374151;
}

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

.month-override-input {
    -moz-appearance: textfield;
}

.calendar-grid-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calendar-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    font-size: 11px;
    color: #6b7280;
}

.legend-gradient {
    width: 120px;
    height: 12px;
    border-radius: 3px;
    background: linear-gradient(90deg, #22c55e, #eab308, #ef4444);
}

.legend-low,
.legend-high {
    font-weight: 500;
}

.calendar-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calendar-month-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.calendar-month-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    width: 36px;
    flex-shrink: 0;
    text-transform: uppercase;
}

.calendar-days {
    display: flex;
    gap: 2px;
    flex: 1;
}

.calendar-day {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    background-color: #1a1a1a;
    cursor: pointer;
    position: relative;
    transition: transform 150ms ease;
}

.calendar-day:hover {
    transform: scale(1.5);
    z-index: 1;
}

.calendar-month-total {
    font-size: 11px;
    font-weight: 500;
    color: #9ca3af;
    width: 60px;
    text-align: right;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.calendar-annual-total {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    font-size: 14px;
    color: #9ca3af;
    padding-top: 8px;
    border-top: 1px solid #2a2a2a;
}

.calendar-annual-total strong {
    color: #ffffff;
    font-size: 16px;
}

.calendar-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    color: #e5e7eb;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}

.calendar-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #374151;
}

.modal-feature-name {
    font-size: 14px;
    font-weight: 500;
    color: #f59e0b;
    margin-bottom: 16px;
}

.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;
}

.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: #059669;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 300;
    animation: toast-in 300ms ease;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.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 {
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

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

    .cost-breakdown {
        padding: 16px;
    }

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

    .button-group {
        flex-direction: column;
    }

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

    .input-row {
        grid-template-columns: 1fr;
    }

    .month-override-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .chart-bar-label {
        width: 80px;
        font-size: 11px;
    }

    .chart-bar-amount {
        width: 60px;
        font-size: 11px;
    }

    .comparison-table {
        font-size: 12px;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 8px 6px;
    }

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

        padding: 0 16px;
    }

    .calendar-day {
        width: 10px;
        height: 10px;
    }

    .calendar-month-label {
        width: 28px;
        font-size: 10px;
    }

    .calendar-month-total {
        width: 48px;
        font-size: 10px;
    }
}

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

    .month-override-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .tier-row {
        flex-wrap: wrap;
    }

    .tier-row-fields {
        flex-wrap: wrap;
    }
}