/* Prayer Guide Styles */
/* Version: 1.7.0 - Added introduction panel from database */
/* Uses unique class names to avoid conflicts with prayer-times card */

/* Prayer Guide Section (like mosque-section) */
.prayer-guide-section {
    padding: 165px 20px 110px;
    min-height: 100vh;
    width: 100%;
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

/* Header (standardized to match Instructions) */
.prayer-guide-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 .prayer-guide-header {
    background: rgba(45, 55, 72, 0.95);
}

.prayer-guide-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;
}

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

.prayer-guide-title-wrapper {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    pointer-events: none;
}

.prayer-guide-header h2 {
    font-size: 24px;
    font-weight: bold;
    color: #2d5016;
    margin: 0;
    pointer-events: auto;
}

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

/* Content Area */
.prayer-guide-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Prayer Type Card (NOT .prayer-card - to avoid conflict) */
.prayer-type-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);
}

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

.prayer-type-card:active {
    transform: translateY(0);
}

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

/* Card Icon */
.prayer-type-icon {
    font-size: 40px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    flex-shrink: 0;
}

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

/* Card Content */
.prayer-type-content {
    flex: 1;
}

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

.dark-mode .prayer-type-title {
    color: white;
}

.prayer-type-description {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.dark-mode .prayer-type-description {
    color: #999;
}

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

.prayer-type-card:hover .prayer-type-arrow {
    transform: translateX(4px);
}

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

    .prayer-guide-header {
        padding: 12px;
    }

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

    .prayer-type-card {
        padding: 16px;
    }

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

    .prayer-type-title {
        font-size: 16px;
    }

    .prayer-type-description {
        font-size: 13px;
    }
}

/* ============================================================================
   Prayer Instructions Section (Instruction Details View)
   ============================================================================ */

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

.instructions-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 .instructions-header {
    background: rgba(45, 55, 72, 0.95);
}

.instructions-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;
}

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

.instructions-title {
    flex: 1;
    text-align: center;
}

.instructions-header h2 {
    font-size: 24px;
    font-weight: bold;
    color: #2d5016;
    margin: 0;
}

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

.instructions-meta {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

.dark-mode .instructions-meta {
    color: #999;
}

/* ============================================================================
   Introduction Panel
   ============================================================================ */

.instructions-introduction-panel {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 16px 20px;
    margin: 8px auto 8px auto;
    max-width: 428px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    font-size: 14px;
    line-height: 1.7;
    color: #444;
}

.dark-mode .instructions-introduction-panel {
    background: rgba(45, 55, 72, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #d0d0d0;
}

.instructions-introduction-panel p {
    margin: 0 0 12px 0;
}

.instructions-introduction-panel p:last-child {
    margin-bottom: 0;
}

.instructions-introduction-panel strong {
    color: #2d5016;
    font-weight: 600;
}

.dark-mode .instructions-introduction-panel strong {
    color: #4CAF50;
}

/* ============================================================================
   Filter Panel (Madhab and Gender Toggles)
   ============================================================================ */

.instructions-filter-panel {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 12px 16px;
    margin: 8px auto 8px auto;
    max-width: 428px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: center;
}

.dark-mode .instructions-filter-panel {
    background: rgba(45, 55, 72, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0;
}

.filter-item:last-child {
    padding: 0;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.dark-mode .filter-label {
    color: #e0e0e0;
}

.filter-label i {
    font-size: 16px;
    color: #4CAF50;
    width: 20px;
    text-align: center;
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(76, 175, 80, 0.1);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 600;
    color: #4CAF50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.filter-toggle:hover {
    background: rgba(76, 175, 80, 0.2);
    transform: scale(1.05);
}

.filter-toggle:active {
    transform: scale(0.98);
}

.dark-mode .filter-toggle {
    background: rgba(76, 175, 80, 0.15);
}

.dark-mode .filter-toggle:hover {
    background: rgba(76, 175, 80, 0.25);
}

.filter-toggle i {
    font-size: 12px;
}

.filter-steps-info {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 11px;
    color: #666;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 4px;
}

.dark-mode .filter-steps-info {
    color: #999;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================================================
   Instructions Content Area
   ============================================================================ */

.instructions-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 20px;
    margin: 0 auto 8px auto;
    max-width: 428px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

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

/* ============================================================================
   Instruction Steps
   ============================================================================ */

.instruction-step {
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
}

.dark-mode .instruction-step {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.instruction-step:last-child {
    border-bottom: none;
}

.instruction-step .step-number {
    position: absolute;
    left: 0;
    top: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1em;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    z-index: 10;
}

.instruction-step .step-content {
    margin-left: 0;
}

.instruction-step .step-content h3 {
    margin: 0 0 20px 55px;
    color: #2d5016;
    font-size: 1.2em;
    font-weight: 600;
}

.dark-mode .instruction-step .step-content h3 {
    color: #4CAF50;
}

/* Step body - horizontal layout: image left, text right */
.step-body {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    width: 100%;
    margin-top: 5px;
}

.step-text {
    flex: 1;
    margin: 0;
    color: #555;
    line-height: 1.6;
}

.dark-mode .step-text {
    color: #b0b0b0;
}

/* ============================================================================
   Illustrations
   ============================================================================ */

.illustration-placeholder {
    background: #f5f5f5;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    transition: all 0.3s ease;
    width: 150px;
    height: 200px;
    margin: 0;
    flex-shrink: 0;
}

.illustration-placeholder i {
    font-size: 2.5em;
    color: #999;
}

.dark-mode .illustration-placeholder {
    background: #2a2a2a;
    border-color: #555;
}

.illustration-placeholder:hover {
    background: #e8eaf6;
    border-color: #9c27b0;
}

.dark-mode .illustration-placeholder:hover {
    background: #3a3a3a;
}

.illustration-placeholder span {
    font-size: 0.7em;
    color: #666;
    text-align: center;
    word-break: break-word;
}

.dark-mode .illustration-placeholder span {
    color: #888;
}

/* ============================================================================
   Responsive Design for Instructions
   ============================================================================ */

@media (max-width: 480px) {
    .prayer-instructions-section {
        padding: 165px 16px 100px;
    }

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

    .instructions-meta {
        font-size: 12px;
    }

    .instruction-step {
        flex-direction: column;
        gap: 12px;
    }

    .instruction-step .step-number {
        align-self: flex-start;
    }
}
