/* Phrase Row Component Styles */

/* Base styles for phrase item */
.phrase-item {
    margin-bottom: 0.5rem;
    border-radius: 0.375rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease-in-out;
}

.phrase-item:hover {
    box-shadow: 0 0.125rem 0.5rem rgba(46, 73, 59, 0.1);
    transform: scale(1.0125);
    transition: box-shadow 0.2s, transform 0.18s;
}

/* Header styles */
.phrase-header {
    background-color: var(--subtle-bg, #B3C7AA);
    padding: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.phrase-header:hover {
    background-color: #9DB891;
}

/* Word breakdown grid */
.word-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

.word-item {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease-in-out;
    text-align: center;
}

.word-item:hover {
    background-color: var(--subtle-bg, #B3C7AA);
}

.word-item.selected-word {
    background-color: var(--button-color, #68835C);
    border: 1px solid var(--secondary-text, #68835C);
    color: white;
}

/* Word breakdown text hierarchy */
.word-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-text, #2E493B);
    margin-bottom: 0.25rem;
}

.pronunciation {
    font-size: 0.875rem;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 0.25rem;
}

.meaning {
    font-size: 0.75rem;
    color: #495057;
    font-weight: 400;
    line-height: 1.2;
}

/* Selected word state overrides */
.word-item.selected-word .word-text {
    color: white;
}

.word-item.selected-word .pronunciation {
    color: rgba(255, 255, 255, 0.8);
}

.word-item.selected-word .meaning {
    color: rgba(255, 255, 255, 0.9);
}

/* Consistent font size for English text in phrase header */
.phrase-header .english-text {
    font-size: 1.04rem;
    font-weight: bold;
}

/* Translation preview styling - same size but not bold */
.phrase-header .translation-preview {
    font-size: 1.04rem;
    font-weight: normal;
    color: var(--primary-text);
    margin-top: 0.25rem;
}

/* Custom Generating badge styling */
.badge.bg-secondary {
    background-color: #2E493B !important;
    color: #fff !important;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Output content */
.output-content {
    font-size: 1.5rem;
    line-height: 1.4;
}

/* Audio player */
.audio-player {
    width: 100%;
    max-width: 300px;
    margin-top: 0.5rem;
}

/* Button group adjustments */
.button-group-compact .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .word-breakdown-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .output-content {
        font-size: 1.25rem;
    }
}

/* Voice Gender Button Styles */
.voice-gender-group {
    display: flex;
    gap: 0;
    border-radius: 0.375rem;
    overflow: hidden;
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.voice-gender-btn {
    background: white;
    border: none;
    padding: 0.5rem 0.75rem;
    color: #495057;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    min-width: 50px;
    font-size: 0.875rem;
}

.voice-gender-btn:hover {
    background-color: #f8f9fa;
    color: #212529;
    transform: translateY(-1px);
}

.voice-gender-btn.active {
    background-color: var(--button-color, #68835C);
    color: white;
    font-weight: 600;
}

.voice-gender-btn.active:hover {
    background-color: #5a7350;
    transform: translateY(-1px);
}

.voice-gender-btn:first-child {
    border-right: 1px solid #dee2e6;
}

.voice-gender-btn.active:first-child {
    border-right-color: var(--button-color, #68835C);
}

.voice-gender-btn i {
    font-size: 1rem;
    opacity: 0.8;
}

.voice-gender-btn.active i {
    opacity: 1;
}

/* Flashcard specific voice gender styling */
.flashcard-voice-gender-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.flashcard-voice-gender .voice-gender-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    min-width: 80px;
}
