/* Chinese Text-to-Speech Plugin Styles */

#chinese-tts-container {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    text-align: center;
}

#chinese-tts-toggle-btn {
    background: none;
    color: inherit;
    border: none;
    backdrop-filter: none;
    font-weight: 400;
}

#chinese-tts-toggle-btn:hover {
    transform: none;
    box-shadow: none;
    text-decoration: underline;
}

.chinese-tts-icon {
    width: 20px;
    height: 20px;
    display: flex;
    text-indent: -99999em;
    overflow: hidden;
    background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjBweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyMHB4IiBmaWxsPSIjNWY2MzY4Ij48cGF0aCBkPSJNMzg0LTE0NEgyMTZxLTI5IDAtNTAuNS0yMS41VDE0NC0yMTZ2LTI2NHEwLTcwIDI2LjctMTMxLjEzIDI2LjctNjEuMTQgNzIuMTQtMTA2LjQgNDUuNDMtNDUuMjcgMTA2LjgtNzEuODdRNDExLTgxNiA0ODAuNS04MTZxNjkuNSAwIDEzMC42MyAyNi42IDYxLjE0IDI2LjYgMTA2LjQgNzEuODcgNDUuMjcgNDUuMjYgNzEuODcgMTA2LjRRODE2LTU1MCA4MTYtNDgwdjI2NHEwIDI5LTIxLjE1IDUwLjVUNzQ0LTE0NEg1NzZ2LTI4OGgxNjh2LTQ4cTAtMTEwLjMxLTc2Ljc4LTE4Ny4xNi03Ni43OC03Ni44NC0xODctNzYuODRUMjkzLTY2Ny4xNlEyMTYtNTkwLjMxIDIxNi00ODB2NDhoMTY4djI4OFptLTcyLTIxNmgtOTZ2MTQ0aDk2di0xNDRabTMzNiAwdjE0NGg5NnYtMTQ0aC05NlptLTMzNiAwaC05NiA5NlptMzM2IDBoOTYtOTZaIi8+PC9zdmc+);
}

/* 基础按钮样式 */
.chinese-tts-btn {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 8px 16px;
    background: #007cba;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.chinese-tts-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chinese-tts-btn:active {
    transform: translateY(0);
}

.chinese-tts-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 特定按钮样式 */
.chinese-tts-play, .chinese-tts-toggle {
    background: #28a745;
}

.chinese-tts-play:hover, .chinese-tts-toggle:hover {
    background: #218838;
}

.chinese-tts-pause {
    background: #ffc107;
    color: #212529;
}

.chinese-tts-pause:hover {
    background: #e0a800;
}

.chinese-tts-stop {
    background: #dc3545;
}

.chinese-tts-stop:hover {
    background: #c82333;
}

/* 进度条 */
.chinese-tts-progress {
    margin-top: 15px;
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.chinese-tts-progress-bar {
    height: 100%;
    background: #007cba;
    transition: width 0.3s ease;
}

/* 状态信息 */
.chinese-tts-status {
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

/* 最小化样式 */
.chinese-tts-style-minimal {
    background: transparent;
    color: #007cba;
    border: 1px solid #007cba;
    padding: 6px 12px;
}

.chinese-tts-style-minimal:hover {
    background: #007cba;
    color: white;
    transform: none;
    box-shadow: none;
}

/* 现代样式 */
.chinese-tts-style-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 25px;
    padding: 10px 20px;
    box-shadow: 0 4px 15px 0 rgba(116, 79, 168, 0.3);
}

.chinese-tts-style-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(116, 79, 168, 0.4);
}

/* 管理员页面样式 */
.chinese-tts-admin {
    max-width: 800px;
}

.chinese-tts-admin h2 {
    color: #23282d;
    margin-bottom: 20px;
}

.chinese-tts-admin .form-table {
    margin-top: 20px;
}

.chinese-tts-admin .form-table th {
    padding: 20px 10px 20px 0;
    width: 200px;
}

.chinese-tts-admin .form-table td {
    padding: 15px 10px;
}

.chinese-tts-admin input[type="text"], 
.chinese-tts-admin select {
    width: 300px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.chinese-tts-admin .description {
    color: #666;
    font-style: italic;
    margin-top: 5px;
}

/* 测试区域 */
.chinese-tts-test-area {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-top: 20px;
}

.chinese-tts-test-controls {
    margin-top: 10px;
}

.chinese-tts-test-controls button {
    margin-right: 10px;
    margin-bottom: 10px;
}

/* 语音信息 */
.chinese-tts-voice-info {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
}

.chinese-tts-voice-info h4 {
    margin: 0 0 10px 0;
    color: #0073aa;
}

.chinese-tts-voice-info ul {
    margin: 0;
    padding-left: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #chinese-tts-container {
        text-align: center;
        padding: 10px 0;
    }
    
    #chinese-tts-toggle-btn {
        min-height: 44px; /* iOS推荐的最小触摸目标 */
        padding: 12px 16px;
        font-size: 16px; /* 防止iOS缩放 */
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
    
    .chinese-tts-btn {
        margin: 5px 0;
        width: 100%;
        justify-content: center;
        min-height: 44px;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
    
    .chinese-tts-admin input[type="text"], 
    .chinese-tts-admin select {
        width: 100%;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    /* 移动设备错误提示 */
    .chinese-tts-error-mobile {
        position: fixed;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: #ff4444;
        color: white;
        padding: 10px 20px;
        border-radius: 5px;
        z-index: 10000;
        font-size: 14px;
        max-width: 90%;
        text-align: center;
    }
}

/* 微信浏览器特殊样式 */
.chinese-tts-wechat-disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    background: #ccc !important;
}

.chinese-tts-wechat-toast {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.4;
    box-sizing: border-box;
}

/* 微信环境下的按钮提示 */
#chinese-tts-toggle-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #ccc !important;
    color: #666 !important;
}

#chinese-tts-toggle-btn:disabled:hover {
    transform: none !important;
    text-decoration: none !important;
}

/* 按钮文字样式 */
.chinese-tts-btn .btn-text {
    margin-left: 8px;
}

/* 朗读中状态样式 */
.chinese-tts-btn.reading {
    background: #ffc107;
    color: #212529;
}

.chinese-tts-btn.reading:hover {
    background: #e0a800;
}
