/* XPath & CSS Selector Tester Styles */

.selector-textarea {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
}

/* Modern Mode Selector */
.mode-selector-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    padding: 0;
}

.mode-option {
    position: relative;
}

.mode-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mode-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.mode-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mode-icon .fsvg {
    opacity: 0.6;
    transition: all 0.3s ease;
}

.mode-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mode-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

.mode-desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

/* Hover State */
.mode-label:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.mode-label:hover .mode-icon {
    background: #e8edf3;
}

.mode-label:hover .mode-icon .fsvg {
    opacity: 0.8;
}

/* Checked State */
.mode-input:checked + .mode-label {
    border-color: #052c65;
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(5, 44, 101, 0.1), inset 0 0 0 1px rgba(5, 44, 101, 0.1);
    transform: translateY(0);
}

.mode-input:checked + .mode-label .mode-icon {
    background: #052c65;
}

.mode-input:checked + .mode-label .mode-icon .fsvg {
    filter: brightness(0) invert(1);
    opacity: 1;
}

.mode-input:checked + .mode-label .mode-title {
    color: #052c65;
}

.mode-input:checked + .mode-label .mode-desc {
    color: #475569;
}

/* Dark Mode */
[data-bs-theme="dark"] .mode-label {
    background: #1a1d23;
    border-color: #343a40;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .mode-icon {
    background: #2d3239;
}

[data-bs-theme="dark"] .mode-title {
    color: #e9ecef;
}

[data-bs-theme="dark"] .mode-desc {
    color: #9ca3af;
}

[data-bs-theme="dark"] .mode-label:hover {
    border-color: #495057;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .mode-label:hover .mode-icon {
    background: #3a3f47;
}

[data-bs-theme="dark"] .mode-input:checked + .mode-label {
    border-color: #6ea8fe;
    background: #212529;
    box-shadow: 0 2px 8px rgba(110, 168, 254, 0.2), inset 0 0 0 1px rgba(110, 168, 254, 0.2);
}

[data-bs-theme="dark"] .mode-input:checked + .mode-label .mode-icon {
    background: #6ea8fe;
}

[data-bs-theme="dark"] .mode-input:checked + .mode-label .mode-title {
    color: #6ea8fe;
}

[data-bs-theme="dark"] .mode-input:checked + .mode-label .mode-desc {
    color: #9ca3af;
}

/* Highlighted HTML Box */
.selector-highlighted-box {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

[data-bs-theme="dark"] .selector-highlighted-box {
    background-color: #212529;
    border-color: #495057;
}

.selector-html-pre {
    margin: 0;
    padding: 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-word;
    color: #212529;
}

[data-bs-theme="dark"] .selector-html-pre {
    color: #f8f9fa;
}

/* Matches Container */
.selector-matches-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.selector-match-item {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-left: 4px solid #0d6efd;
    border-radius: 0.375rem;
    padding: 1rem;
}

[data-bs-theme="dark"] .selector-match-item {
    background-color: #212529;
    border-color: #495057;
    border-left-color: #6ea8fe;
}

.selector-match-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #dee2e6;
}

[data-bs-theme="dark"] .selector-match-header {
    border-bottom-color: #495057;
}

.selector-match-tag {
    color: #0d6efd;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

[data-bs-theme="dark"] .selector-match-tag {
    color: #6ea8fe;
}

.selector-match-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.selector-match-attrs,
.selector-match-text {
    font-size: 0.875rem;
}

.selector-match-attrs code {
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    margin-right: 0.5rem;
}

[data-bs-theme="dark"] .selector-match-attrs code {
    background-color: #343a40;
    color: #f8f9fa;
}

.selector-match-text {
    color: #495057;
    line-height: 1.5;
}

[data-bs-theme="dark"] .selector-match-text {
    color: #adb5bd;
}
