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

.section-title {
    font-size: 18px;
    font-weight: 500;
    color: #d1d5db;
}

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

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

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

.hex-prefix {
    font-size: 16px;
    font-weight: 600;
    color: #6b7280;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.hex-field {
    flex: 1;
    font-family: 'Inter', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.color-picker-input {
    width: 48px;
    height: 48px;
    border: 1px solid #374151;
    border-radius: 6px;
    background-color: #141414;
    cursor: pointer;
    padding: 2px;
    flex-shrink: 0;
    transition: border-color 150ms ease;
}

.color-picker-input:hover {
    border-color: #3b82f6;
}

.color-picker-input::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.color-picker-input::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.color-picker-input::-moz-color-swatch {
    border: none;
    border-radius: 4px;
}

.color-fields-row {
    display: flex;
    gap: 12px;
}

.color-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.color-field .text-input {
    width: 100%;
    text-align: center;
    -moz-appearance: textfield;
}

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

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

.swatch-comparison {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.swatch-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.swatch {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 1px solid #374151;
    transition: background-color 150ms ease;
}

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

.swatch-hex {
    font-size: 13px;
    font-weight: 500;
    color: #e5e7eb;
    font-family: 'Inter', monospace;
}

.match-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.match-name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.match-name {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.source-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    background-color: #1a1a1a;
    color: #9ca3af;
    letter-spacing: 0.5px;
}

.source-badge.css {
    background-color: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.source-badge.extended {
    background-color: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.match-score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

.score-percentage {
    font-size: 28px;
    font-weight: 700;
    color: #10b981;
}

.score-percentage.high {
    color: #10b981;
}

.score-percentage.medium {
    color: #eab308;
}

.score-percentage.low {
    color: #f97316;
}

.score-delta {
    font-size: 14px;
    color: #6b7280;
}

.format-values {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background-color: #0a0a0a;
    border-radius: 6px;
    border: 1px solid #1f2937;
}

.format-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
}

.format-label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    min-width: 40px;
    flex-shrink: 0;
}

.format-value {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    font-family: 'Inter', monospace;
    flex: 1;
}

.copy-btn {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #9ca3af;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    flex-shrink: 0;
}

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

.copy-btn.copied {
    background-color: #059669;
    border-color: #059669;
    color: #ffffff;
}

.nearest-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nearest-title {
    font-size: 15px;
    font-weight: 500;
    color: #d1d5db;
}

.nearest-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nearest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background-color: #0a0a0a;
    border: 1px solid #1f2937;
    border-radius: 6px;
    cursor: pointer;
    transition: all 150ms ease;
}

.nearest-item:hover {
    background-color: #1a1a1a;
    border-color: #374151;
}

.nearest-rank {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nearest-swatch {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid #374151;
    flex-shrink: 0;
}

.nearest-name {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nearest-percentage {
    font-size: 13px;
    font-weight: 600;
    color: #10b981;
    flex-shrink: 0;
}

.nearest-hex {
    font-size: 12px;
    color: #6b7280;
    font-family: 'Inter', monospace;
    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-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;
}

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

.pro-section.unlocked {
    opacity: 1;
}

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

.pro-section-header h3 {
    font-size: 18px;
    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;
}

.pantone-result {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background-color: #0a0a0a;
    border: 1px solid #1f2937;
    border-radius: 6px;
}

.pantone-swatch {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.pantone-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pantone-name {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.pantone-hex {
    font-size: 13px;
    color: #9ca3af;
    font-family: 'Inter', monospace;
}

.pantone-score {
    font-size: 13px;
    font-weight: 500;
    color: #10b981;
}

.pantone-nearest-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

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

.batch-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: 'Inter', monospace;
    line-height: 1.8;
}

.batch-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.batch-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

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

.batch-table td {
    padding: 10px 12px;
    color: #e5e7eb;
    border-bottom: 1px solid #1f2937;
}

.batch-table tbody tr:nth-child(even) {
    background-color: #0a0a0a;
}

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

.batch-table .batch-swatch {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid #374151;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

.batch-actions {
    display: flex;
    gap: 12px;
}

.token-style-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.token-style-selector > label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

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

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #d1d5db;
    padding: 6px 0;
}

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

.radio-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #374151;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: border-color 150ms ease;
}

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

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    background-color: #3b82f6;
    border-radius: 50%;
}

.token-result {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background-color: #0a0a0a;
    border: 1px solid #1f2937;
    border-radius: 6px;
}

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

.token-label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    flex-shrink: 0;
}

.token-value {
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
    font-family: 'Inter', monospace;
}

.tailwind-result {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background-color: #0a0a0a;
    border: 1px solid #1f2937;
    border-radius: 6px;
}

.tailwind-swatch {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.tailwind-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tailwind-name {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.tailwind-hex {
    font-size: 13px;
    color: #9ca3af;
    font-family: 'Inter', monospace;
}

.tailwind-score {
    font-size: 13px;
    font-weight: 500;
    color: #10b981;
}

.tailwind-classes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background-color: #0a0a0a;
    border: 1px solid #1f2937;
    border-radius: 6px;
    margin-top: 12px;
}

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

.class-label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    flex-shrink: 0;
}

.class-value {
    font-size: 14px;
    font-weight: 500;
    color: #60a5fa;
    font-family: 'Inter', monospace;
    background-color: rgba(59, 130, 246, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.tailwind-nearest-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.history-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 320px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background-color: #0a0a0a;
    border: 1px solid #1f2937;
    border-radius: 6px;
    cursor: pointer;
    transition: all 150ms ease;
}

.history-item:hover {
    background-color: #1a1a1a;
    border-color: #374151;
}

.history-swatch {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid #374151;
    flex-shrink: 0;
}

.history-hex {
    font-size: 13px;
    font-weight: 500;
    color: #e5e7eb;
    font-family: 'Inter', monospace;
    min-width: 70px;
}

.history-name {
    font-size: 13px;
    color: #9ca3af;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-time {
    font-size: 12px;
    color: #6b7280;
    flex-shrink: 0;
}

.history-actions {
    display: flex;
    gap: 12px;
}

.export-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.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;
    transition: color 150ms ease;
}

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

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

.modal-hidden {
    display: none;
}

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

    .output-section {
        padding: 16px;
    }

    .pro-section {
        padding: 16px;
    }

    .swatch-comparison {
        flex-direction: column;
        align-items: center;
    }

    .swatch {
        width: 100px;
        height: 100px;
    }

    .color-fields-row {
        gap: 8px;
    }

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

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

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

        padding: 0 16px;
    }

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

    .nearest-item {
        flex-wrap: wrap;
    }

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

@media (max-width: 480px) {
    .swatch {
        width: 80px;
        height: 80px;
    }

    .match-name {
        font-size: 20px;
    }

    .score-percentage {
        font-size: 24px;
    }

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

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