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

.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);
    margin: 0;
    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 {
    width: 24px;
    height: 24px;
    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;
}

/* Cron Expression Display */
.cron-result-card {
    border: 1px solid var(--bs-border-color);
}

.cron-expression-display {
    background: var(--bs-secondary-bg);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--bs-border-color);
    text-align: center;
}

.cron-expression-display code {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bs-primary-text-emphasis);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* Human Readable Section */
.human-readable-section {
    text-align: center;
    padding: 1rem 0.5rem;
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.05) 0%, rgba(var(--bs-primary-rgb), 0.1) 100%);
    border-radius: 0.5rem;
    border: 1px dashed rgba(var(--bs-primary-rgb), 0.3);
}

.human-readable-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--bs-secondary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.human-readable-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bs-primary-text-emphasis);
    line-height: 1.4;
}

/* Input Hint */
.input-hint {
    padding: 0.5rem 0.75rem;
    background: var(--bs-info-bg-subtle);
    border-left: 3px solid #052c65;
    border-radius: 0.25rem;
    margin-top: 0.75rem;
}

.input-hint small {
    color: var(--bs-body-color);
    font-size: 0.85rem;
}

/* Next Runs List */
#nextRunsList .list-group-item {
    padding: 0.5rem 0.75rem;
    border-left: 3px solid #052c65;
    border-right: 0;
    border-top: 0;
    font-size: 0.9rem;
}

#nextRunsList .list-group-item:first-child {
    border-top: 1px solid var(--bs-border-color);
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .mode-selector-modern {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .mode-label {
        padding: 14px;
    }

    .mode-icon {
        width: 44px;
        height: 44px;
    }

    .mode-title {
        font-size: 15px;
    }

    .mode-desc {
        font-size: 12px;
    }

    .cron-expression-display code {
        font-size: 0.95rem;
    }

    .human-readable-text {
        font-size: 1.1rem;
    }

    .card-header h6 {
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .mode-label {
        padding: 12px;
        gap: 10px;
    }

    .mode-icon {
        width: 40px;
        height: 40px;
    }

    .mode-icon img {
        width: 20px;
        height: 20px;
    }
}

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

[data-bs-theme="dark"] .cron-expression-display {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
}

[data-bs-theme="dark"] .human-readable-section {
    background: rgba(var(--bs-primary-rgb), 0.08);
}

[data-bs-theme="dark"] .input-hint {
    background: rgba(74, 123, 200, 0.1);
    border-left-color: #4a7bc8;
}

[data-bs-theme="dark"] #nextRunsList .list-group-item {
    border-left-color: #4a7bc8;
}
