/* SSML Feature Styles */
/* Styles specific to the SSML TTS testing feature */

.ssml-container {
    max-width: 800px;
    margin: 0 auto;
}

.session-selection {
    margin-bottom: 20px;
}

.session-selection-row {
    margin-bottom: 12px;
}

.session-selection-row:last-child {
    margin-bottom: 0;
}

.session-selection label,
.session-selection-row label {
    display: block;
    font-size: 1em;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
}

.session-select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-elevated);
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.session-select:hover {
    border-color: var(--border-hover);
}

.session-select:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.1);
}

.ssml-controls {
    display: flex;
    gap: 20px;
    align-items: end;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.phase-chime-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    padding-bottom: 4px;
}

.phase-chime-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--brand-primary);
    cursor: pointer;
}

.session-info {
    background: rgba(var(--brand-primary-rgb), 0.05);
    border: 1px solid rgba(var(--brand-primary-rgb), 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.session-title {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.session-details {
    font-size: 0.9em;
    color: var(--text-muted);
    line-height: 1.5;
}

.voice-selection {
    display: flex;
    align-items: center;
    gap: 10px;
}

.voice-selection label {
    font-size: 1em;
    color: var(--text-secondary);
    font-weight: 500;
}

.ssml-select {
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-elevated);
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.ssml-select:hover {
    border-color: var(--border-hover);
}

.ssml-select:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.1);
}

.btn-ssml-start {
    background: var(--color-success);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-ssml-start:hover {
    background: var(--color-success-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--color-success-rgb), 0.4);
}

.btn-ssml-stop {
    background: var(--color-danger);
    color: white;
}

.btn-ssml-stop:hover {
    background: var(--color-danger-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--color-danger-rgb), 0.4);
}

.btn-ssml-stop:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#ssml-stop {
    margin-left: 0.5rem;
}

.ssml-textarea-container {
    margin-bottom: 20px;
}

.ssml-textarea {
    width: 100%;
    height: 400px;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-elevated);
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.3s ease;
}

.ssml-textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.1);
}

.ssml-textarea::placeholder {
    color: var(--text-placeholder);
}

.ssml-status {
    min-height: 24px;
    font-size: 0.9em;
    color: var(--text-muted);
    text-align: center;
}

.ssml-status.warning {
    color: var(--color-warning-hover);
}

.ssml-status.error {
    color: var(--color-danger);
}

.ssml-status.success {
    color: var(--color-success);
}

/* Segment list */
.segment-list-container {
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}

.segment-list-heading {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
    font-weight: normal;
}

.segment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.segment-list-item {
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.25rem;
    border-radius: 4px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.segment-list-item:hover {
    background-color: rgba(var(--brand-primary-rgb), 0.08);
}

.segment-list-item.active {
    background-color: rgba(var(--brand-primary-rgb), 0.15);
    color: var(--text-primary);
}

.segment-type-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
    flex-shrink: 0;
    min-width: 3.5rem;
}

.segment-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.segment-duration {
    font-size: 0.75rem;
    opacity: 0.5;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .ssml-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .voice-selection,
    .rate-selection,
    .pitch-selection {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .voice-selection label,
    .rate-selection label,
    .pitch-selection label {
        align-self: flex-start;
    }

    .ssml-select {
        min-width: auto;
        width: 100%;
    }

    .ssml-textarea {
        height: 300px;
        font-size: 13px;
    }
}
