/**
 * AlAmin Educational Platform - Audio Pronunciation Styling
 */

.alamin-term-container {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    vertical-align: middle !important;
}

/* Base circular audio button (Icon only: width 32px, height 32px) */
.alamin-audio-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 50% !important;
    border: 1.5px solid #bae6fd !important;
    background: #e0f2fe !important;
    color: #0284c7 !important;
    cursor: pointer !important;
    font-size: 0.88rem !important;
    padding: 0 !important;
    margin: 0 6px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

.alamin-audio-btn:hover {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    transform: scale(1.12) !important;
    box-shadow: 0 3px 8px rgba(2, 132, 199, 0.35) !important;
}

.alamin-audio-btn:active {
    transform: scale(0.95) !important;
}

/* If button has text or .btn class, format as pill button so text NEVER overflows */
.alamin-audio-btn.btn,
.btn.alamin-audio-btn,
.alamin-audio-pill {
    width: auto !important;
    min-width: auto !important;
    height: 32px !important;
    padding: 4px 14px !important;
    border-radius: 50px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    gap: 6px !important;
    white-space: nowrap !important;
}

.speaking-pulse {
    background: #10b981 !important;
    color: #ffffff !important;
    border-color: #059669 !important;
    animation: alamin-speak-wave 1.1s infinite !important;
}

@keyframes alamin-speak-wave {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1.15);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Audio Pronunciation Announcement Banner */
.alamin-audio-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
    border: 1.5px solid #a7f3d0;
    border-radius: 14px;
    padding: 14px 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.08);
    direction: rtl;
    text-align: right;
}

.alamin-audio-banner .audio-banner-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    background: #10b981;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.alamin-audio-banner .audio-banner-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #065f46;
    margin-bottom: 4px;
}

.alamin-audio-banner .audio-banner-desc {
    font-size: 0.92rem;
    color: #334155;
    line-height: 1.6;
}

/* Floating selection speech tooltip */
.alamin-selection-tooltip {
    position: absolute;
    display: none;
    align-items: center;
    gap: 6px;
    background: #0f172a;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 99999;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: opacity 0.15s ease, transform 0.15s ease;
    transform: translateY(4px);
    opacity: 0;
    pointer-events: none;
    user-select: none;
}

.alamin-selection-tooltip.visible {
    display: inline-flex;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.alamin-selection-tooltip:hover {
    background: #0284c7;
    transform: scale(1.05);
}
