/* ==========================================================================
   DangUy TTS Audio Player - Microsoft Edge AI Voice Reader
   Thiết kế giao diện thanh nghe đọc bài viết theo mẫu chuẩn
   ========================================================================== */

.danguy-tts-widget {
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
}

.single-post-wrap .post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    padding: 6px 14px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #eee;
    margin-bottom: 20px;
    font-size: 13px;
    color: #666;
    min-height: 48px;
    box-sizing: border-box;
}

.single-post-wrap .post-meta .post-meta-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin: 0;
    padding: 0;
}

.single-post-wrap .post-meta .post-meta-left span {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.single-post-wrap .post-meta .post-meta-left span i {
    margin-right: 5px;
    color: var(--dg-primary-light, #c62828);
    font-size: 14px;
    padding: 0;
    line-height: 1;
    display: inline-block;
}

.danguy-tts-player {
    display: inline-flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 3px 10px;
    gap: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    font-family: inherit;
    font-size: 13px;
    color: #495057;
    user-select: none;
    line-height: 1;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.danguy-tts-player:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

/* Play / Pause Button */
.danguy-tts-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #495057;
    font-size: 14px;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 4px;
    transition: transform 0.15s ease, color 0.15s ease;
}

.danguy-tts-btn:hover {
    color: var(--dg-primary-light, #c62828);
    transform: scale(1.1);
}

.danguy-tts-btn:focus {
    outline: none;
}

/* Progress Bar */
.danguy-tts-progress-wrap {
    width: 140px;
    height: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0;
}

@media (max-width: 576px) {
    .danguy-tts-progress-wrap {
        width: 90px;
    }
}

.danguy-tts-progress-bar {
    width: 100%;
    height: 4px;
    background-color: #ced4da;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    transition: height 0.15s ease;
}

.danguy-tts-progress-wrap:hover .danguy-tts-progress-bar {
    height: 6px;
}

.danguy-tts-progress-fill {
    width: 0%;
    height: 100%;
    background-color: #6c757d;
    border-radius: 2px;
    transition: width 0.1s linear, background-color 0.2s ease;
}

.danguy-tts-widget.is-playing .danguy-tts-progress-fill {
    background-color: var(--dg-primary-light, #c62828);
}

/* Time display */
.danguy-tts-time {
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    min-width: 32px;
    text-align: right;
    letter-spacing: 0.2px;
    font-variant-numeric: tabular-nums;
}

/* Select controls */
.danguy-tts-control-group {
    display: inline-flex;
    align-items: center;
}

.danguy-tts-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 3px 22px 3px 8px;
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    outline: none;
    line-height: 1.4;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23495057' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 12px;
}

.danguy-tts-select:hover,
.danguy-tts-select:focus {
    border-color: #adb5bd;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

/* Vertical divider */
.danguy-tts-divider {
    width: 1px;
    height: 18px;
    background-color: #ced4da;
    margin: 0 2px;
}

/* Voice group with mic icon */
.danguy-tts-voice-group {
    gap: 6px;
}

.danguy-tts-mic-icon {
    font-size: 14px;
    color: #495057;
}

/* Status / Loading notification */
.danguy-tts-status {
    margin-top: 6px;
    font-size: 12px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.danguy-tts-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #ced4da;
    border-top-color: var(--dg-primary-light, #c62828);
    border-radius: 50%;
    animation: danguy-tts-spin 0.8s linear infinite;
}

@keyframes danguy-tts-spin {
    to { transform: rotate(360deg); }
}

/* Responsive adjustment */
@media (max-width: 768px) {
    .single-post-wrap .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .danguy-tts-widget {
        width: 100%;
    }
    .danguy-tts-player {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .danguy-tts-player {
        flex-wrap: wrap;
        padding: 6px 10px;
        gap: 6px;
    }
}
