/* ── Service Selector Overlay ── */

.service-selector-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 12, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    animation: fadeIn 0.25s ease-out;
    border-right: 1px solid var(--border);
}

[data-theme='light'] .service-selector-overlay {
    background: rgba(255, 255, 255, 0.9);
}

.service-selector-header {
    margin-bottom: 24px;
}

.service-selector-header h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.service-selector-header p {
    font-size: 12px;
    color: var(--text-muted);
}

.service-selector-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    overflow-y: auto;
    padding-right: 4px;
}

.service-selector-card {
    background: var(--bg-elevated);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.service-selector-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: rgba(255, 71, 87, 0.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.service-selector-card.active {
    border-color: var(--accent);
    background: rgba(255, 71, 87, 0.1);
}

.service-selector-card.active::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 30px;
    background: var(--accent);
    clip-path: polygon(100% 0, 0 0, 100% 100%);
}

.service-selector-card.active .active-icon {
    position: absolute;
    top: 4px;
    right: 4px;
    color: white;
    font-size: 10px;
    z-index: 1;
}

.service-card-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.service-selector-card:hover .service-card-icon {
    background: var(--accent);
    color: white;
    transform: scale(1.1);
}

.service-card-info {
    flex: 1;
}

.service-card-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.service-card-runtime {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.service-selector-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.service-selector-empty i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
    opacity: 0.5;
}

.service-selector-empty a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    display: block;
    margin-top: 12px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Custom scrollbar for the grid */
.service-selector-grid::-webkit-scrollbar {
    width: 4px;
}

.service-selector-grid::-webkit-scrollbar-track {
    background: transparent;
}

.service-selector-grid::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.service-selector-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-top: -4px;
    margin-right: -4px;
}

.service-selector-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

[data-theme='light'] .service-selector-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

.service-selector-close i {
    font-size: 16px;
}
