/*
 * Custom styling for the TTB List Comparison Tool.
 * This replaces the Tailwind CSS and provides a clean, responsive design.
 */
#ttb-list-comparison-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 900px;
    margin: 20px auto;
    padding: 2rem;
    border: 1px solid #e2e8f0;
    background-color: #f9fafb;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

#ttb-list-comparison-app h2 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.ttb-list-inputs {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .ttb-list-inputs {
        flex-direction: row;
    }
}

.ttb-list-inputs > div {
    flex: 1;
}

.ttb-list-inputs label {
    display: block;
    font-size: 1.125rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.ttb-list-inputs textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 200ms;
    resize: vertical;
    min-height: 10rem;
}

.ttb-list-inputs textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.ttb-options-and-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .ttb-options-and-buttons {
        flex-direction: row;
    }
}

.ttb-case-insensitive-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ttb-case-insensitive-option input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #3b82f6;
    border-radius: 0.25rem;
}

.ttb-case-insensitive-option label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    user-select: none;
}

.ttb-buttons {
    display: flex;
    gap: 1rem;
}

#ttb-clear-btn, #ttb-compare-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 9999px; /* rounded-full */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 200ms;
    cursor: pointer;
}

#ttb-clear-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    background-color: #e5e7eb;
    white-space: nowrap; /* Prevent text from wrapping */
}

#ttb-clear-btn:hover {
    background-color: #d1d5db;
}

#ttb-clear-btn svg {
    height: 1.25rem;
    width: 1.25rem;
    margin-right: 0.5rem;
    display: inline-block;
    vertical-align: middle;
}

#ttb-compare-btn {
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    background-color: #3b82f6;
}

#ttb-compare-btn:hover {
    background-color: #2563eb;
}

#ttb-compare-btn svg {
    height: 1.5rem;
    width: 1.5rem;
    margin-right: 0.5rem;
    display: inline-block;
    vertical-align: middle;
}

#ttb-results {
    display: none; /* Starts hidden */
    flex-direction: column;
    gap: 1.5rem;
}

#ttb-results.ttb-results-visible {
    display: flex;
}

.ttb-result-block {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.ttb-result-block h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1f2937;
    display: flex;
    align-items: center;
}

.ttb-result-block h3 svg {
    margin-right: 0.5rem;
    color: #3b82f6;
    height: 1.5rem;
    width: 1.5rem;
}

.ttb-result-block textarea {
    width: 100%;
    min-height: 8rem;
    padding: 1rem;
    color: #1f2937;
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    resize: vertical;
    font-family: monospace;
}

.ttb-result-block textarea:focus {
    outline: none;
}

.ttb-copy-btn {
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background-color: #e5e7eb;
    color: #374151;
    border-radius: 9999px;
    font-weight: 500;
    cursor: pointer;
    transition: all 200ms;
}

.ttb-copy-btn:hover {
    background-color: #d1d5db;
}

.ttb-copy-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.ttb-copy-btn svg {
    height: 1rem;
    width: 1rem;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.25rem;
}
