/* 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;
}

.tab-group {
    display: flex;
    gap: 8px;
}

.tab-btn {
    background-color: #1a1a1a;
    color: #9ca3af;
    border: 1px solid #374151;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.tab-btn:hover {
    border-color: #3b82f6;
    color: #e5e7eb;
}

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

textarea {
    background-color: #0a0a0a;
    color: #e5e7eb;
    border: 1px solid #374151;
    border-radius: 6px;
    padding: 12px;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.5;
    min-height: 200px;
    width: 100%;
    resize: vertical;
    outline: none;
    transition: border-color 150ms ease;
}

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

textarea::placeholder {
    color: #6b7280;
}

textarea[readonly] {
    cursor: default;
}

.file-upload-zone {
    background-color: #0a0a0a;
    border: 2px dashed #374151;
    border-radius: 12px;
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 150ms ease;
    position: relative;
    outline: none;
}

.file-upload-zone.has-file {
    border-style: solid;
    border-color: #374151;
    padding: 24px;
}

.upload-icon {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    opacity: 0.7;
    color: #6b7280;
    letter-spacing: 2px;
}

.upload-primary {
    font-size: 16px;
    font-weight: 400;
    color: #e5e7eb;
    margin-bottom: 4px;
}

.upload-secondary {
    font-size: 14px;
    font-weight: 400;
    color: #9ca3af;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 6px;
    font-size: 13px;
    color: #e5e7eb;
}

.file-info #file-name {
    font-weight: 500;
}

.file-info #file-size {
    color: #9ca3af;
}

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

.options-title {
    font-size: 14px;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 4px;
}

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

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

.checkbox-custom {
    width: 18px;
    height: 18px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 4px;
    position: relative;
    transition: all 150ms ease;
    flex-shrink: 0;
}

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

label.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.pro-options-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
    padding: 12px;
    border: 1px solid #374151;
    border-radius: 6px;
    background-color: #111111;
}

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

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

.button-primary.success {
    background-color: #059669;
}

.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: all 150ms ease;
    text-align: center;
}

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

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

.output-group textarea {
    min-height: 180px;
}

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

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.stats-grid .stat-card {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
    padding: 12px;
    background-color: #1a1a1a;
    border-radius: 6px;
}

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

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #e5e7eb;
}

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

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

.action-buttons .button-primary,
.action-buttons .button-secondary {
    flex: 1;
}

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

.pro-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.progress-bar {
    width: 100%;
    height: 4px;
    background-color: #374151;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #3b82f6;
    border-radius: 2px;
    width: 0%;
    transition: width 200ms ease;
}

.batch-results-table {
    width: 100%;
    border-collapse: collapse;
}

.batch-results-table th {
    background-color: #1a1a1a;
    color: #6b7280;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    text-align: left;
}

.batch-results-table td {
    padding: 10px 12px;
    font-size: 13px;
    color: #e5e7eb;
    border-bottom: 1px solid #374151;
}

.batch-results-table tr:nth-child(even) td {
    background-color: #111111;
}

.batch-results-table .savings-cell {
    color: #10b981;
    font-weight: 500;
}

.batch-results-table .total-row td {
    font-weight: 600;
    border-top: 2px solid #374151;
    border-bottom: none;
}

.batch-results-table .download-cell button {
    background: none;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.batch-results-table .download-cell button:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

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

.rule-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.rule-row input {
    background-color: #0a0a0a;
    border: 1px solid #374151;
    border-radius: 4px;
    padding: 8px 10px;
    color: #e5e7eb;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
    font-size: 13px;
    flex: 1;
    outline: none;
    transition: border-color 150ms ease;
}

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

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

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

.rule-row .rule-remove:hover {
    color: #ef4444;
}

.rules-actions {
    display: flex;
    gap: 8px;
}

.rules-actions .button-secondary {
    padding: 8px 16px;
    font-size: 13px;
}

.pro-cta-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    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: 15px;
    color: #9ca3af;
    margin-bottom: 20px;
}

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

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

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

    .options-group {
        padding: 16px;
    }

    .output-section {
        padding: 16px;
    }

    .pro-panel {
        padding: 16px;
    }

    textarea {
        min-height: 150px;
    }

    .stats-grid .stat-card {
        flex: 1 1 100%;
    }

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

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

    .tab-group {
        flex-wrap: wrap;
    }

    .file-upload-zone {
        padding: 32px 16px;
    }

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

        padding: 0 16px;
    }

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

    .rule-row input {
        min-width: 0;
    }

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

    .batch-results-table th,
    .batch-results-table td {
        padding: 6px 8px;
        font-size: 12px;
    }

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

@media (max-width: 480px) {
    .stat-card {
        padding: 10px;
    }

    .stat-value {
        font-size: 16px;
    }
}