/**
 * Azkar Feature Styles
 * Premium selector modal with the app's green/white theme
 */

/* =========================================
   MODAL CONTAINER
   ========================================= */

.azkar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.azkar-modal.show {
    display: flex;
    opacity: 1;
}

.azkar-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.azkar-modal-content {
    position: relative;
    width: 95%;
    max-width: 520px;
    max-height: 85vh;
    background: var(--card-bg, #fff);
    border-radius: 24px;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.azkar-modal.show .azkar-modal-content {
    transform: scale(1) translateY(0);
}

/* =========================================
   CLOSE BUTTON - FLOATING CORNER
   ========================================= */

.azkar-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    z-index: 10;
}

.azkar-close-btn:hover {
    background: #2d7a5b;
    transform: scale(1.1) rotate(90deg);
}

/* =========================================
   HEADER
   ========================================= */

.azkar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px 16px;
    background: linear-gradient(135deg, var(--primary-color, #3a9d74) 0%, #2d8a65 100%);
    position: relative;
}

.azkar-header-title {
    font-family: var(--ui-font, 'Readex Pro', sans-serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.azkar-back-btn {
    position: absolute;
    left: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.azkar-back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-2px);
}

/* =========================================
   BODY
   ========================================= */

.azkar-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: linear-gradient(180deg, rgba(58, 157, 116, 0.03) 0%, transparent 100%);
}

/* =========================================
   TYPE SELECTOR SCREEN
   ========================================= */

.azkar-type-screen {
    text-align: center;
}

.azkar-intro {
    font-size: 1rem;
    color: var(--muted-text, #666);
    margin-bottom: 28px;
    font-weight: 500;
}

.azkar-type-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.azkar-type-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px;
    background: linear-gradient(135deg, var(--card-bg, #fff) 0%, rgba(58, 157, 116, 0.02) 100%);
    border: 2px solid var(--border-color, #e0e5e8);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.azkar-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(58, 157, 116, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.azkar-type-card:hover {
    border-color: var(--primary-color, #3a9d74);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(58, 157, 116, 0.2);
}

.azkar-type-card:hover::before {
    opacity: 1;
}

.azkar-type-card:active {
    transform: translateY(-2px) scale(1.01);
}

.azkar-type-icon {
    font-size: 3rem;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.azkar-type-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    z-index: 1;
}

.azkar-type-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color, #333);
}

.azkar-type-count {
    font-size: 0.9rem;
    color: var(--primary-color, #3a9d74);
    font-weight: 600;
}

.azkar-type-time {
    font-size: 0.75rem;
    color: white;
    background: var(--primary-color, #3a9d74);
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(58, 157, 116, 0.3);
    position: relative;
    z-index: 1;
}

/* =========================================
   LIST SCREEN
   ========================================= */

.azkar-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 4px;
}

.azkar-list::-webkit-scrollbar {
    width: 4px;
}

.azkar-list::-webkit-scrollbar-track {
    background: transparent;
}

.azkar-list::-webkit-scrollbar-thumb {
    background: var(--primary-color, #3a9d74);
    border-radius: 4px;
}

.azkar-list-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e0e5e8);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
}

.azkar-list-item:hover {
    border-color: var(--primary-color, #3a9d74);
    background: rgba(58, 157, 116, 0.03);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(58, 157, 116, 0.1);
}

.azkar-list-number-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.azkar-list-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color, #3a9d74), #2d8a65);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(58, 157, 116, 0.3);
}

.azkar-list-rep {
    font-size: 0.7rem;
    color: var(--primary-color, #3a9d74);
    font-weight: 700;
    background: rgba(58, 157, 116, 0.1);
    padding: 2px 8px;
    border-radius: 8px;
}

.azkar-list-content {
    flex: 1;
    min-width: 0;
}

.azkar-list-text {
    font-family: var(--arabic-font, 'Amiri', serif);
    font-size: 1.05rem;
    color: var(--text-color, #333);
    direction: rtl;
    text-align: right;
    line-height: 1.8;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.azkar-list-arrow {
    color: var(--primary-color, #3a9d74);
    font-size: 0.9rem;
    margin-top: 8px;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.azkar-list-item:hover .azkar-list-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* =========================================
   LIST FOOTER
   ========================================= */

.azkar-list-footer {
    padding-top: 20px;
    margin-top: 20px;
    border-top: 2px dashed var(--border-color, #e0e5e8);
}

.azkar-start-session-btn {
    width: 100%;
    padding: 16px 28px;
    background: linear-gradient(135deg, var(--primary-color, #3a9d74), #2d8a65);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(58, 157, 116, 0.35);
    letter-spacing: 0.3px;
}

.azkar-start-session-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(58, 157, 116, 0.45);
}

.azkar-start-session-btn:active {
    transform: translateY(-1px);
}

.azkar-start-session-btn i {
    font-size: 0.9rem;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media screen and (max-width: 500px) {
    .azkar-modal-content {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .azkar-close-btn {
        top: 12px;
        right: 12px;
    }

    .azkar-list {
        max-height: 60vh;
    }

    .azkar-type-icon {
        font-size: 2.5rem;
    }
}

/* =========================================
   DARK MODE
   ========================================= */

body.dark-mode .azkar-type-card,
body.dark-mode .azkar-list-item {
    background: var(--card-bg, #252a28);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .azkar-type-card:hover,
body.dark-mode .azkar-list-item:hover {
    background: rgba(58, 157, 116, 0.15);
}

body.dark-mode .azkar-header {
    background: linear-gradient(135deg, #2d7a5b 0%, #1f5940 100%);
}

body.dark-mode .azkar-close-btn {
    background: #2d7a5b;
}