/**
 * Quick Navigation Component for Quran Page
 * Dayah Babul 'Ilmi
 */

.quick-nav-container {
    position: sticky;
    top: 70px;
    z-index: 100;
    margin-bottom: 2rem;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quick-nav-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.quick-nav-card:hover {
    box-shadow: var(--shadow-md);
}

.quick-nav-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: block;
}

.quick-nav-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%230d6b3d' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.quick-nav-select:hover {
    border-color: var(--primary-color);
    background-color: #fff;
}

.quick-nav-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 107, 61, 0.1);
    background-color: #fff;
}

.quick-nav-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: rgba(0, 0, 0, 0.05);
}

.quick-nav-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(13, 107, 61, 0.3);
}

.quick-nav-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 107, 61, 0.4);
}

.quick-nav-btn:active:not(:disabled) {
    transform: translateY(0);
}

.quick-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.quick-nav-btn i {
    transition: transform 0.3s ease;
}

.quick-nav-btn:hover:not(:disabled) i {
    transform: translateX(4px);
}

/* Dark mode support */
[data-theme="dark"] .quick-nav-card {
    background: rgba(30, 30, 30, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .quick-nav-select {
    background: rgba(40, 40, 40, 0.9);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2310b981' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
}

[data-theme="dark"] .quick-nav-select:hover,
[data-theme="dark"] .quick-nav-select:focus {
    background-color: rgba(50, 50, 50, 0.9);
}

/* Responsive */
@media (max-width: 767.98px) {
    .quick-nav-container {
        top: 60px;
    }

    .quick-nav-card {
        padding: 1rem;
    }

    .quick-nav-select {
        padding: 0.65rem 0.85rem;
        font-size: 0.9rem;
    }

    .quick-nav-btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* Loading state */
.quick-nav-loading {
    position: relative;
    pointer-events: none;
}

.quick-nav-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(13, 107, 61, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}