/**
 * 劳务报酬个税计算器样式
 */

.aiowtb-labor-income-tax-calculator {
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

/* 计算模式切换 */
.aiowtb-tax-calculator-mode {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
    padding: 14px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    background-color: #f9f9fd;
}

.aiowtb-mode-switch {
    margin: 0 15px;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}



.aiowtb-mode-switch input {
    margin-right: 8px;
    accent-color: #4a8af4;
    transition: transform 0.2s;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.aiowtb-mode-switch input:checked {
    transform: scale(1.1);
}

/* 选中的计算模式高亮样式 */
.aiowtb-mode-switch input:checked + span {
    background-color: #4a8af4;
    color: white;

    border-radius: 6px;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(74, 138, 244, 0.3);
}
.aiowtb-mode-switch span {
    color: #4a8af4;
    line-height: 20px;
    padding: 4px 5px;
    font-size: 16px;
}

/* 表单元素样式 */
.aiowtb-tax-calculator-form {
    margin-bottom: 30px;
}

.aiowtb-form-group {
    margin-bottom: 24px;
    transition: opacity 0.3s, transform 0.3s;
}

.aiowtb-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.aiowtb-input {
    width: 96%;
    padding: 12px 16px;
    border: 1px solid #e0e0f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.aiowtb-input:focus {
    border-color: #4a8af4;
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 138, 244, 0.15);
    transform: translateY(-1px);
}

.aiowtb-input-hint {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.aiowtb-form-group:hover .aiowtb-input-hint {
    opacity: 1;
}

.aiowtb-input.error {
    border-color: #e53935;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.aiowtb-error-message {
    color: #e53935;
    font-size: 13px;
    margin-top: 8px;
    display: flex;
    align-items: center;
}

.aiowtb-error-message:before {
    content: "!";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #e53935;
    color: white;
    border-radius: 50%;
    margin-right: 6px;
    font-size: 12px;
    font-weight: bold;
}

/* 按钮样式 */
.aiowtb-button-group {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 30px;
}

.aiowtb-button {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.aiowtb-button {
    background-color: #4a8af4;
    color: white;
    box-shadow: 0 4px 10px rgba(74, 138, 244, 0.2);
}

.aiowtb-button:hover {
    background-color: #3875d7;
    box-shadow: 0 6px 15px rgba(74, 138, 244, 0.25);
    transform: translateY(-2px);
}

.aiowtb-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(74, 138, 244, 0.2);
}

.aiowtb-button-secondary {
    background-color: #f5f5f8;
    color: #444;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.aiowtb-button-secondary:hover {
    background-color: #e8e8f0;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.aiowtb-button:disabled {
    background-color: #c0c0c0;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* 结果区域样式 */
.aiowtb-result-container {
    margin-top: 35px;
    padding: 22px;
    background-color: #f9faff;
    border-radius: 10px;
    border-left: 4px solid #4a8af4;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    animation: resultFadeIn 0.5s ease;
}

@keyframes resultFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aiowtb-result-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 18px;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}

.aiowtb-result-title:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, #4a8af4, rgba(74, 138, 244, 0.5));
    border-radius: 3px;
}

.aiowtb-result-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #e0e0e0;
    transition: background-color 0.2s;
}

.aiowtb-result-row:hover {
    background-color: rgba(74, 138, 244, 0.03);
}

.aiowtb-result-row:last-child {
    border-bottom: none;
    margin-top: 5px;
    padding-top: 15px;
    
}

.aiowtb-result-label {
    color: #555;
    font-weight: 500;
    font-size: 16px;
}

.aiowtb-result-value {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.aiowtb-result-highlight {
    font-size: 20px;
    color: #4a8af4;
    text-shadow: 0 1px 2px rgba(74, 138, 244, 0.1);
    font-size: 16px;
}

/* 历史记录区域 */
.aiowtb-history-container {
    margin-top: 35px;
    padding: 18px;
    background-color: #fafafa;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.aiowtb-history-title {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.aiowtb-history-clear {
    font-size: 13px;
    color: #666;
    cursor: pointer;
    text-decoration: none;
    padding: 4px 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
    transition: all 0.2s;
    font-weight: normal;
}

.aiowtb-history-clear:hover {
    background-color: #e0e0e0;
    color: #333;
}

.aiowtb-history-records {
    max-height: 250px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f5f5f5;
}

.aiowtb-history-records::-webkit-scrollbar {
    width: 6px;
}

.aiowtb-history-records::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.aiowtb-history-records::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

.aiowtb-history-item {
    padding: 14px;
    margin-bottom: 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.aiowtb-history-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.12);
    border-color: rgba(74, 138, 244, 0.2);
}

.aiowtb-history-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    color: #777;
    padding-bottom: 6px;
    border-bottom: 1px solid #f0f0f0;
}

.aiowtb-history-item-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.aiowtb-history-amount {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.aiowtb-history-tax {
    color: #e53935;
    font-weight: 500;
    background-color: rgba(229, 57, 53, 0.08);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
}

/* 税法说明区域 */
.aiowtb-tax-info {
    margin-top: 35px;
    padding: 20px;
    background-color: #fffdf9;
    border-radius: 10px;
    border-left: 4px solid #ffa726;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.aiowtb-tax-info h4 {
    color: #333;
    margin-bottom: 12px;
    font-size: 17px;
    font-weight: 600;
}

.aiowtb-tax-info p {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

.aiowtb-tax-rules {
    margin-top: 15px;
    background-color: rgba(255, 167, 38, 0.03);
    padding: 12px;
    border-radius: 6px;
}

.aiowtb-tax-rules ol, 
.aiowtb-tax-rules ul {
    padding-left: 24px;
    margin: 10px 0;
}

.aiowtb-tax-rules li {
    margin-bottom: 10px;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

.aiowtb-tax-rules ul li {
    list-style-type: circle;
}

/* 响应式样式 */
@media screen and (max-width: 768px) {
    .aiowtb-labor-income-tax-calculator {
        padding: 16px;
        margin: 0 -10px;
        border-radius: 8px;
    }
    
    .aiowtb-tax-calculator-mode {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }
    
    .aiowtb-mode-switch {
        margin: 5px 0;
        width: 100%;
        text-align: center;
    }
    
    .aiowtb-button-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .aiowtb-button {
        width: 100%;
        padding: 14px 20px;
    }
    
    .aiowtb-result-row {
        padding: 12px 0;
    }
    
    .aiowtb-result-label, 
    .aiowtb-result-value {
        font-size: 16px;
    }
    
    .aiowtb-result-highlight {
        font-size: 16px;
    }
    
    .aiowtb-history-item-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        font-size: 14px;
    }
    
    .aiowtb-history-tax {
        align-self: flex-end;
    }
    
    /* 改善小屏幕上的表单体验 */
    .aiowtb-input {
        font-size: 16px; /* 防止iOS自动缩放 */
        padding: 14px 16px;
        width: 89%;
    }
    
    .aiowtb-label {
        font-size: 15px;
    }
    
    /* 改善小屏幕上的滚动条 */
    .aiowtb-history-records {
        max-height: 200px;
    }
}


/* 错误提示框 */
.aiowtb-error-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background-color: #e53935;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
    z-index: 1000;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-width: 90%;
    text-align: center;
}

.aiowtb-error-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* 计算按钮计算中状态 */
.aiowtb-button.calculating {
    background-color: #7ba9f7;
    position: relative;
    overflow: hidden;
    pointer-events: none;
}

.aiowtb-button.calculating:after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    animation: calculatingShimmer 1.5s infinite;
}

@keyframes calculatingShimmer {
    100% {
        left: 100%;
    }
}

/* 输入框聚焦状态 */
.aiowtb-form-group.focused .aiowtb-input {
    border-color: #4a8af4;
    box-shadow: 0 0 0 3px rgba(74, 138, 244, 0.15);
    transform: translateY(-1px);
}

.aiowtb-form-group.focused .aiowtb-label {
    color: #4a8af4;
} 