/* AI虎哥多语言翻译插件样式 */

/* 后台设置页面样式 */
.wp-translate-admin-wrap {
    max-width: 900px;
    margin: 20px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 25px;
}

.wp-translate-admin-wrap h1 {
    color: #23282d;
    font-size: 24px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.wp-translate-admin-wrap .form-table th {
    font-weight: 600;
    padding: 15px 10px 15px 0;
}

.wp-translate-admin-wrap .submit {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* 自定义语言设置区域 */
#custom-languages-container {
    margin-bottom: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    padding: 15px;
    background: #f9f9f9;
}

.custom-language-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e0e0e0;
}

.custom-language-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.custom-language-row input[type="text"] {
    flex: 1;
    margin-right: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    padding: 8px 12px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.07);
}

.custom-language-row input[type="text"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 2px rgba(0,115,170,0.8);
}

#add-language-button {
    background: #0073aa;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

#add-language-button:hover {
    background: #005f8b;
}

.remove-language-button {
    background: #f44336;
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-language-button:hover {
    background: #d32f2f;
}

/* 插件说明区域 */
.plugin-description {
    background: #f8f9fa;
    border-left: 4px solid #0073aa;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
}

.plugin-description h2 {
    margin-top: 0;
    color: #23282d;
    font-size: 18px;
}

.plugin-description p {
    margin: 8px 0;
    line-height: 1.6;
}

.plugin-description .warning {
    color: #d32f2f;
    font-weight: 500;
}

.plugin-description .info {
    color: #0073aa;
}

.plugin-description .success {
    color: #388e3c;
}

/* 前端翻译按钮样式 */
.translate-button-container {
    background: linear-gradient(to right, #f8f9fa, #ffffff);
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    border-radius: 4px;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.translate-button-container:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.translate-button-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.translate-button-item {
    display: flex;
    align-items: center;
}

.translate-button-link {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    background: linear-gradient(to bottom, #0088cc, #0073aa);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.translate-button-link:hover {
    background: linear-gradient(to bottom, #0073aa, #005f8b);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.translate-button-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.3);
}

/* 菜单和小工具中的翻译按钮 */
.translate-menu-button {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    background: #0073aa;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
}

.translate-menu-button:hover {
    background: #005f8b;
}

.translate-popup {
    display: none;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 8px;
    position: fixed;
    z-index: 9999;
    max-width: 600px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border: 1px solid rgba(0,0,0,0.1);
}

.translate-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
}

.translate-popup-close:hover {
    color: #d32f2f;
}

/* 缓存管理样式 */
.cache-stats, .sitemap-stats {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.cache-stats p, .sitemap-stats p {
    margin: 5px 0;
    color: #555;
}

.cache-stats strong {
    color: #23282d;
}

.sitemap-stats {
    background: #f0f8ff;
    border-color: #b3d9ff;
}

.sitemap-stats a {
    color: #0073aa;
    text-decoration: none;
}

.sitemap-stats a:hover {
    text-decoration: underline;
}

.sitemap-stats .description {
    font-style: italic;
    color: #666;
    font-size: 13px;
}

.cache-actions {
    margin-top: 10px;
}

.cache-actions .button {
    margin-right: 10px;
    margin-bottom: 5px;
}

.cache-actions .button-secondary {
    background: #f7f7f7;
    border-color: #ccc;
    color: #555;
    transition: all 0.2s ease;
}

.cache-actions .button-secondary:hover {
    background: #fafafa;
    border-color: #999;
    color: #23282d;
}

/* 升级检测样式 */
.update-check {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.update-check p {
    margin: 5px 0;
    color: #856404;
}

#update-status {
    background: #ffffff;
    border: 1px solid #ddd;
    padding: 10px;
    margin: 10px 0;
    border-radius: 3px;
    min-height: 20px;
    color: #333;
}

#update-status a {
    color: #0073aa;
    text-decoration: none;
    font-weight: bold;
}

#update-status a:hover {
    text-decoration: underline;
}

#check-update-btn {
    background: #0073aa;
    color: white;
    border: 1px solid #005a87;
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#check-update-btn:hover {
    background: #005a87;
    border-color: #004a6b;
}

/* 缓存统计信息样式 */
.wp-translate-admin-wrap .cache-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: center;
}

.wp-translate-admin-wrap .cache-stats p:first-child {
    grid-column: 1 / -1;
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wp-translate-admin-wrap .cache-stats {
        grid-template-columns: 1fr;
    }
    
    .cache-actions .button {
        display: block;
        width: 100%;
        margin-bottom: 10px;
        text-align: center;
    }
    
    .custom-language-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .custom-language-row input[type="text"] {
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    .translate-button-list {
        flex-direction: column;
        align-items: center;
    }
    
    .translate-button-item {
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
    }
}