/**
 * Allah Intelligence - Quran Teaching Tool
 * Transcription Service Styles
 */

/* Transcription Service Toggle */
.transcription-result {
    padding: 10px;
    border-radius: 8px;
    background-color: var(--card-bg);
    box-shadow: var(--card-shadow);
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.service-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    background-color: #f8f8f8;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.service-btn.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.service-btn:hover:not(.active) {
    background-color: #e0e0e0;
}

.section-label {
    font-size: 0.8rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 2px;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    border: 1px solid #333;
    background-color: #333;
    border-radius: 4px;
    cursor: pointer;
    text-align: right;
}

.divider {
    height: 1px;
    background-color: #eee;
    margin: 8px 0;
    width: 100%;
}

/* Recognition Text Styling */
.recognition-arabic {
    font-size: 1.5rem;
    direction: rtl;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    color: #0d47a1; /* Darker blue for better contrast */
    font-weight: bold;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
    padding: 12px;
    background-color: rgba(232, 245, 255, 0.8); /* More opaque light blue background */
    border-radius: 8px;
    border-right: 4px solid #0d47a1;
    overflow-wrap: break-word;
    word-break: break-word;
}

.recognition-transliteration {
    font-style: italic;
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 1.1rem;
    padding: 5px 0;
}

.recognition-translation {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    padding: 5px;
    font-style: italic;
    color: #666;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    padding: 5px 0;
}

.meaning-comparison {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    padding: 5px;
    background-color: rgba(245, 245, 245, 0.3);
    border-radius: 4px;
    color: #666;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    padding: 5px 0;
    border-top: 1px dashed #ddd;
    padding-top: 10px;
}

.similarity-score {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 0.5rem;
    color: #fff;
    background-color: #333;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    text-align: center;
    margin: 1rem 0;
}

/* Compact mode for mobile devices */
@media (max-width: 768px) {
    .recognition-arabic {
        font-size: 1.2rem;
        padding: 6px;
    }
    
    .recognition-transliteration,
    .recognition-translation,
    .meaning-comparison {
        font-size: 0.8rem;
        padding: 4px;
    }
    
    .similarity-score {
        font-size: 0.9rem;
    }
    
    .section-label {
        font-size: 0.7rem;
    }
    
    .transcription-result {
        padding: 8px;
    }
}

/* Feedback Toast */
.feedback-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    max-width: 80%;
    text-align: center;
}

.feedback-toast.visible {
    opacity: 1;
}

.feedback-toast.success {
    background-color: #4CAF50;
}

.feedback-toast.error {
    background-color: #F44336;
}

.feedback-toast.warning {
    background-color: #FF9800;
}

[data-theme="dark"] .feedback-toast {
    background-color: #555;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

/* Dark Mode Adjustments */
/* Settings hint box */
.settings-hint {
    position: fixed;
    top: 60px;
    right: 60px;
    background-color: #fff;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    padding: 10px 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    z-index: 998;
    max-width: 200px;
    animation: pulse 2s infinite;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.settings-hint-arrow {
    position: absolute;
    top: -20px;
    right: 10px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 20px solid #4CAF50;
}

.settings-hint-close {
    align-self: flex-end;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    margin-bottom: 5px;
}

.settings-hint-text {
    font-size: 14px;
    color: #333;
    text-align: center;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

[data-theme="dark"] .settings-hint {
    background-color: #333;
    border-color: #4a6fa5;
}

[data-theme="dark"] .settings-hint-arrow {
    border-bottom-color: #4a6fa5;
}

[data-theme="dark"] .settings-hint-text {
    color: #eee;
}

[data-theme="dark"] .settings-hint-close {
    color: #ddd;
}

[data-theme="dark"] .section-label {
    font-size: 0.8rem;
    font-weight: bold;
    color: #888;
    margin-bottom: 2px;
    text-transform: uppercase;
    background-color: #333;
    border-color: #555;
    color: #eee;
}

[data-theme="dark"] .service-btn {
    background-color: #333;
    border-color: #555;
    color: #eee;
}

[data-theme="dark"] .service-btn.active {
    background-color: #388E3C;
    border-color: #388E3C;
}

[data-theme="dark"] .service-btn:hover:not(.active) {
    background-color: #444;
}

[data-theme="dark"] .recognition-arabic {
    color: #64b5f6; /* Lighter blue for dark mode */
    background-color: rgba(13, 71, 161, 0.3); /* Dark blue background with transparency */
    border-right: 4px solid #64b5f6;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

[data-theme="dark"] .recognition-transliteration {
    color: #aaa;
}

[data-theme="dark"] .recognition-translation {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    padding: 5px;
    font-style: italic;
    color: #666;
    color: #ddd;
}

[data-theme="dark"] .meaning-comparison {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    padding: 5px;
    background-color: rgba(245, 245, 245, 0.3);
    border-radius: 4px;
    color: #666;
    color: #ddd;
    border-top: 1px dashed #444;
}

/* Dark mode score colors - slightly adjusted for better visibility */
[data-theme="dark"] .excellent-score {
    background-color: rgba(76, 175, 80, 0.15);
    color: #81c784;
    border-left: 4px solid #81c784;
}

[data-theme="dark"] .good-score {
    background-color: rgba(255, 193, 7, 0.15);
    color: #ffd54f;
    border-left: 4px solid #ffd54f;
}

[data-theme="dark"] .fair-score {
    background-color: rgba(255, 152, 0, 0.15);
    color: #ffb74d;
    border-left: 4px solid #ffb74d;
}

[data-theme="dark"] .poor-score {
    background-color: rgba(244, 67, 54, 0.15);
    color: #e57373;
    border-left: 4px solid #e57373;
}

[data-theme="dark"] .recognition-loading {
    color: #aaa;
}

[data-theme="dark"] .recognition-error {
    color: #ef5350;
}

[data-theme="dark"] .no-results {
    color: #ef5350;
}
