/**
 * 税金税率计算器样式
 */

/* 整体容器样式 */
.aiowtb-tax-calculator {
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* 选项卡导航样式 */
.aiowtb-tax-calculator-tab-nav {
    display: flex;
    flex-wrap: wrap;
   
    border-bottom: 1px solid #e0e0e0;
    gap: 0.5rem;
}

.aiowtb-tab-label {
    margin-bottom: 0;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1 1 auto;
    min-width: 110px;
    text-align: center;
}

.aiowtb-tab-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.aiowtb-tab-label span {
    display: block;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    background-color: #f7f7f7;
    border-radius: 6px 6px 0 0;
    font-weight: normal;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
}

.aiowtb-tab-label:hover span {
    background-color: #f0f0f0;
}

.aiowtb-tab-label input[type="radio"]:checked + span {
    background-color: #fff;
    border-color: #e0e0e0;
    border-bottom: 2px solid #1a73e8;
    position: relative;
    z-index: 1;
    font-weight: 500;
    color: #1a73e8;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

/* 选项卡内容样式 */
.aiowtb-tax-calculator-tab-content {
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
    border-top: none;
    background-color: #fff;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 表单样式 */
.aiowtb-form {
    margin-bottom: 1.5rem;
}

.aiowtb-form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.aiowtb-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
}

.aiowtb-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) inset;
}

.aiowtb-input:focus {
    border-color: #1a73e8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.aiowtb-button {
    background-color: #1a73e8;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

.aiowtb-button:hover {
    background-color: #0d62d3;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.aiowtb-button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 结果区域样式 */
.aiowtb-tax-calculator-result {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f8fafe;
    border: 1px solid #d0e3ff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    /* 默认隐藏，通过JavaScript控制显示 */
    display: none;
}

.aiowtb-tax-calculator-result h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #1a73e8;
    font-size: 1.1rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

.aiowtb-result-content {
    margin-top: 1rem;
}

.aiowtb-result-item {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    font-size: 16px;
}

.aiowtb-result-item:hover {
    background-color: rgba(26, 115, 232, 0.05);
}

.aiowtb-result-label {
    font-weight: 500;
    color: #555;
    margin-right: 0.3rem;
}

.aiowtb-result-value {
    word-break: break-all;
    color: #1a73e8;
    font-weight: 500;
}

/* 错误提示样式 */
.aiowtb-error-message {
    color: #d32f2f;
    background-color: #fde8e8;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
    border-left: 4px solid #d32f2f;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.aiowtb-error-message:before {
    content: "⚠️";
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* 响应式适配 */
@media screen and (max-width: 768px) {
    .aiowtb-tax-calculator-tab-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .aiowtb-tab-label {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 0;
    }
    
    .aiowtb-tab-label span {
        font-size: 0.85rem;
        padding: 0.6rem 0.5rem;
    }
    
    .aiowtb-tax-calculator-tab-content {
        padding: 1rem;
    }
    
    .aiowtb-result-item {
        flex-direction: column;
        display: block;
    }
    
    .aiowtb-result-label {
        width: 100%;
        display: inline;
        margin-bottom: 0.25rem;
    }
}

@media screen and (max-width: 480px) {
    .aiowtb-tab-label {
        flex: 1 1 100%;
    }
    
    .aiowtb-tax-calculator-tab-nav {
        flex-direction: column;
        border-bottom: none;
    }
    
    .aiowtb-tab-label span {
        border-radius: 6px;
        border-bottom: 1px solid #e0e0e0;
        margin-bottom: 0.25rem;
    }
    
    .aiowtb-tab-label input[type="radio"]:checked + span {
        border-bottom: 1px solid #1a73e8;
    }
    
    .aiowtb-tax-calculator-tab-content {
        border-radius: 6px;
        border-top: 1px solid #e0e0e0;
        margin-top: 0.5rem;
    }
}

/* 结果区域可复制提示 */
.aiowtb-result-copy-hint {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.75rem;
    font-style: italic;
    text-align: center;
}

/* 高亮显示计算结果 */
.aiowtb-result-highlight {
    background-color: #e8f0fe;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    transition: background-color 0.2s ease;
}

.aiowtb-result-highlight:hover {
    background-color: #d2e3fc;
}

/* 输入框悬停效果 */
.aiowtb-input:hover {
    border-color: #b8b8b8;
}

/* 添加输入框前缀图标的容器 */
.aiowtb-input-with-icon {
    position: relative;
}

.aiowtb-input-with-icon .aiowtb-input {
    padding-left: 2.5rem;
}

.aiowtb-input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.1rem;
}

/* 结果动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.aiowtb-result-updated .aiowtb-result-item {
    animation: fadeIn 0.3s ease-out forwards;
}

/* 为结果区域添加复制功能的提示 */
.aiowtb-tax-calculator-result {
    position: relative;
}

.aiowtb-copy-results {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f0f4f9;
    border: 1px solid #d0e3ff;
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    color: #1a73e8;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.aiowtb-copy-results:hover {
    background: #e8f0fe;
}

/* 结果区域出现的动画 */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aiowtb-tax-calculator-result.show-result {
    animation: slideDown 0.4s ease-out forwards;
} 