/* Duas Section Styles */
/* Version: 1.0 */
/* Matches Prayer Guide design pattern with dark mode support */

/* ============================================================================
   Duas Section
   ============================================================================ */

.duas-section {
    padding: 165px 20px 110px;
    min-height: 100vh;
    width: 100%;
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

/* Header (matches Prayer Guide style) */
.duas-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 0;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: fixed;
    top: 85px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 428px;
    z-index: 90;
}

.dark-mode .duas-header {
    background: rgba(45, 55, 72, 0.95);
}

.duas-header .back-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4CAF50;
    font-size: 18px;
    position: relative;
    z-index: 1;
}

.duas-header .back-btn:hover {
    background: rgba(76, 175, 80, 0.2);
    transform: scale(1.05);
}

.duas-title-wrapper {
    position: absolute;
    left: 60px;
    right: 20px;
    text-align: center;
    pointer-events: none;
}

.duas-header h2 {
    font-size: 24px;
    font-weight: bold;
    color: #2d5016;
    margin: 0;
    pointer-events: auto;
    /* Truncate long header titles */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.dark-mode .duas-header h2 {
    color: #4CAF50;
}

/* Search Panel */
.duas-search-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: fixed;
    top: 155px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 428px;
    z-index: 89;
}

.dark-mode .duas-search-panel {
    background: rgba(45, 55, 72, 0.95);
}

.duas-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.duas-search-input:focus {
    outline: none;
    border-color: #4CAF50;
    background: rgba(255, 255, 255, 1);
}

.dark-mode .duas-search-input {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.dark-mode .duas-search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #4CAF50;
}

.duas-search-btn {
    width: 48px;
    height: 48px;
    border: none;
    background: #4CAF50;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.duas-search-btn:hover {
    background: #45a049;
    transform: scale(1.05);
}

.duas-search-btn:active {
    transform: scale(0.95);
}

/* Content Area */
.duas-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 0;
    transition: margin-top 0.3s ease;
}

/* Add margin when search panel is visible */
.duas-section:has(.duas-search-panel[style*="display: flex"]) .duas-content {
    margin-top: 80px;
}

/* Category/Subcategory Card (matches prayer-type-card) */
.dua-category-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 20px;
    margin: 0 auto;
    width: 100%;
    max-width: 428px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dua-category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.dua-category-card:active {
    transform: translateY(0);
}

.dark-mode .dua-category-card {
    background: rgba(45, 55, 72, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Icon container (matches prayer-type-icon) */
.category-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    flex-shrink: 0;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    color: #4CAF50;
}

.dark-mode .category-icon {
    background: rgba(255, 255, 255, 0.1);
}

/* Bookmark indicators on category/subcategory cards */
.category-icon.has-bookmarks {
    background: #FFD700 !important;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.category-icon .bookmark-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #d32f2f;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Different colors for different categories */
.category-icon.morning {
    color: #FFC107;
}

.category-icon.evening {
    color: #3F51B5;
}

.category-icon.food {
    color: #4CAF50;
}

.category-icon.general {
    color: #9C27B0;
}

/* Text content */
.category-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 6px 0;
}

.dark-mode .category-title {
    color: white;
}

.category-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.dark-mode .category-subtitle {
    color: #999;
}

.category-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #95A5A6;
    margin-top: 4px;
}

/* Arrow (matches prayer-type-arrow) */
.category-arrow {
    font-size: 20px;
    color: #4CAF50;
    transition: transform 0.3s ease;
}

.dua-category-card:hover .category-arrow {
    transform: translateX(4px);
}

/* Individual Dua Card */
.dua-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 24px;
    margin: 0 auto 8px;
    width: 100%;
    max-width: 428px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark-mode .dua-card {
    background: rgba(45, 55, 72, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dua-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.dua-number {
    font-size: 14px;
    font-weight: 600;
    color: #4CAF50;
}

.dua-badges {
    display: flex;
    gap: 8px;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Badge colors are applied dynamically from database via JavaScript */

.dua-title-en {
    font-size: 18px;
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 16px;
}

.dark-mode .dua-title-en {
    color: white;
}

.dua-arabic {
    font-size: 24px;
    font-weight: 600;
    color: #2C3E50;
    text-align: right;
    direction: rtl;
    line-height: 1.8;
    margin-bottom: 12px;
    font-family: 'Traditional Arabic', 'Arial Unicode MS', sans-serif;
}

.dark-mode .dua-arabic {
    color: white;
}

.dua-transliteration {
    font-size: 14px;
    font-style: italic;
    color: #7F8C8D;
    margin-bottom: 12px;
}

.dark-mode .dua-transliteration {
    color: #999;
}

.dua-translation {
    font-size: 15px;
    color: #34495E;
    line-height: 1.6;
    margin-bottom: 16px;
}

.dark-mode .dua-translation {
    color: #CCC;
}

.dua-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.dark-mode .dua-meta {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.meta-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
}

.meta-icon {
    color: #95A5A6;
    width: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.meta-label {
    font-weight: 600;
    color: #7F8C8D;
    min-width: 80px;
}

.meta-value {
    color: #34495E;
    flex: 1;
}

.dark-mode .meta-value {
    color: #CCC;
}

.dua-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

/* Bookmark Button */
.bookmark-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.bookmark-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.bookmark-btn.active {
    background: #FFD700;
    color: #333;
}

.bookmark-btn.active:hover {
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* Copy Button */
.copy-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

/* Load More Button */
.load-more-btn {
    width: 100%;
    max-width: 428px;
    padding: 14px;
    margin: 16px auto 0;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.load-more-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.load-more-btn:active {
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .duas-section {
        padding: 165px 16px 100px;
    }

    .duas-header {
        padding: 12px;
    }

    .duas-header h2 {
        font-size: 20px;
    }

    .dua-category-card {
        padding: 16px;
    }

    .category-icon {
        font-size: 32px;
        width: 50px;
        height: 50px;
    }

    .category-title {
        font-size: 16px;
    }

    .category-subtitle {
        font-size: 13px;
    }

    .dua-arabic {
        font-size: 20px;
    }
}
