/**
 * Learning Shortcodes Styles
 * Gagana-Samoa Theme
 * 
 * Maintains consistency with existing theme aesthetic
 * Golden/taro color scheme with professional academic feel
 */

/* ==========================================================================
   Base Container Styles
   ========================================================================== */

.samoan-learning-material {
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    width: 95%;
    max-width: 95%;
}

/* ==========================================================================
   Audio Controls
   ========================================================================== */

.audio-control {
    background: #f6b402;
    color: #323710;
    border: none;
    border-radius: 6px;
    width: 40px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 12px;
    flex-shrink: 0;
}

.audio-control:hover {
    background: #e5a400;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(246, 180, 2, 0.4);
}

.audio-control:active {
    transform: scale(0.95);
}

.audio-control.playing {
    background: #007b98;
    color: white;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 123, 152, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(0, 123, 152, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 123, 152, 0); }
}

.audio-control .audio-icon {
    font-size: 18px;
    line-height: 1;
    display: block;
    color: #323710;
}

/* If Font Awesome is loaded, use it */
.audio-control .fa {
    font-size: 16px;
}

.audio-control-small {
    width: 32px;
    height: 26px;
    margin-right: 8px;
    border-radius: 4px;
}

.audio-control-small .audio-icon {
    font-size: 14px;
}

.audio-inline {
    width: 36px;
    height: 28px;
    margin-right: 8px;
    border-radius: 4px;
}

/* ==========================================================================
   1. Single Phrase Shortcode
   ========================================================================== */

.samoan-phrase-container {
    display: flex;
    gap: 15px;
    align-items: stretch;
}

.samoan-field,
.english-field {
    flex: 1;
    padding: 20px;
    border-radius: 6px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
}

.samoan-text {
    font-size: 1.15rem;
    font-weight: 600;
    color: #323710;
    line-height: 1.4;
}

.english-text {
    font-size: 1.1rem;
    color: #4a4a4a;
    line-height: 1.4;
}

/* ==========================================================================
   2. Vocabulary Grid Shortcode
   ========================================================================== */

.vocab-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 0 !important;
    background: transparent !important;
}

.vocab-item {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    box-shadow: none;
}

.vocab-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: rgba(246, 180, 2, 0.3);
}

.vocab-samoan {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px;
    background: transparent;
    border-radius: 4px;
}

.vocab-samoan-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: #323710;
}

.vocab-english {
    font-size: 1rem;
    color: #666;
    padding: 0 8px;
}

/* ==========================================================================
   3. Conversation Shortcode
   ========================================================================== */

.conversation-container {
    padding: 0 !important;
    background: transparent !important;
}

.conversation-title {
    margin: 0 0 20px 0;
    color: #323710;
    font-size: 1.3rem;
}

.play-all-button {
    background: #007b98;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.play-all-button:hover {
    background: #006580;
    transform: translateY(-1px);
}

.play-all-button svg {
    width: 20px;
    height: 20px;
}

.conversation-lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.conversation-line {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.speaker-label {
    font-weight: 700;
    color: #323710;
    min-width: 30px;
    padding-top: 10px;
}

.line-content {
    flex: 1;
    display: flex;
    gap: 15px;
}

.samoan-bubble {
    flex: 1;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
}

.bubble-samoan {
    font-size: 1.1rem;
    font-weight: 500;
    color: #323710;
}

.english-translation {
    flex: 1;
    padding: 10px 15px;
    font-style: italic;
    color: #666;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
}

/* Alternating speaker styles - keeping subtle difference */
.speaker-a .samoan-bubble {
    background: #f5f5f5;
}

.speaker-b .samoan-bubble {
    background: #efefef;
}

/* ==========================================================================
   4. Audio List Shortcode
   ========================================================================== */

.audio-list-container {
    padding: 0 !important;
    background: transparent !important;
}

.audio-list-title {
    margin: 0 0 20px 0;
    color: #323710;
    font-size: 1.3rem;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(246, 180, 2, 0.3);
}

.audio-list-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.list-item {
    display: flex;
    align-items: stretch;
    counter-increment: list-counter;
}

.numbered-list .list-item::before {
    content: counter(list-counter) ".";
    font-weight: 600;
    color: #323710;
    margin-right: 12px;
    min-width: 25px;
    padding-top: 8px;
}

.numbered-list .audio-list-items {
    counter-reset: list-counter;
}

.bulleted-list .list-item::before {
    content: "•";
    font-weight: 700;
    color: #f6b402;
    margin-right: 12px;
    min-width: 25px;
    font-size: 1.2rem;
    padding-top: 5px;
}

.list-item-content {
    flex: 1;
    display: flex;
    gap: 15px;
    align-items: stretch;
}

.samoan-part {
    flex: 1;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    padding: 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
}

.english-part {
    flex: 1;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    padding: 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    color: #666;
}

.list-samoan-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #323710;
}

/* ==========================================================================
   5. Samoan Alphabet Shortcode
   ========================================================================== */

.samoan-alphabet-container {
    padding: 0 !important;
    background: transparent !important;
}

.alphabet-title {
    margin: 0 0 25px 0;
    color: #323710;
    font-size: 1.4rem;
    text-align: center;
}

.alphabet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.alphabet-item {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.alphabet-item:hover {
    border-color: #f6b402;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(246, 180, 2, 0.2);
}

.letter-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.letter {
    font-size: 2rem;
    font-weight: 700;
    color: #323710;
    line-height: 1;
}

.letter-audio {
    width: 24px;
    height: 24px;
    margin-right: 0;
}

.letter-example {
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.example-samoan {
    display: block;
    font-weight: 600;
    color: #007b98;
    margin-bottom: 4px;
}

.example-english {
    display: block;
    font-size: 0.85rem;
    color: #999;
}

/* ==========================================================================
   Mobile Responsive Styles
   ========================================================================== */

@media (max-width: 768px) {
    .samoan-phrase-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .vocab-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .line-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .list-item-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .alphabet-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 10px;
    }
    
    .letter {
        font-size: 1.5rem;
    }
    
    /* Ensure touch targets are at least 44px */
    .audio-control {
        width: 44px;
        height: 44px;
    }
    
    .audio-control-small,
    .audio-inline {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .samoan-learning-material {
        margin: 0 auto;
        padding: 10px;
        width: 98%;
    }
    
    .vocab-grid-container {
        grid-template-columns: 1fr;
    }
    
    .alphabet-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .numbered-list .list-item::before,
    .bulleted-list .list-item::before {
        min-width: 20px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .audio-control,
    .play-all-button {
        display: none !important;
    }
    
    .samoan-learning-material {
        border: 1px solid #ddd;
        box-shadow: none;
    }
}