/* 
 * 电费计算器样式 - 现代化UI
 */

/* 主容器样式 */
.pwt-electricity-bill-calculator {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #444;
    max-width: 100%!important;
    margin: 0 auto;
    line-height: 1.6;
    padding: 0;
    border-radius: 10px;
    font-size: 16px;
    
}
.pwt-tool-title{margin: 22px 0;}
.pwt-tool-description{font-size: 16px!important;}
/* 段落分隔样式 */
.pwt-electricity-bill-calculator .pwt-section {
    margin-bottom: 30px;
    padding: 25px;
    border: none;
    border-radius: 10px;
    background-color: #fff;
    
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}


.pwt-electricity-bill-calculator .pwt-section-title {
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #3a7bc2;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

/* 表单样式 */
.pwt-electricity-bill-calculator .pwt-form-group {
    margin: 10px 0;
    position: relative;
    margin-bottom: 25px; /* 增加间距以容纳错误信息 */
}

/* 输入框与按钮的组合样式 */
.pwt-electricity-bill-calculator .pwt-input-with-button {
    display: flex;
    align-items: center;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.pwt-electricity-bill-calculator .pwt-input-with-button .pwt-input {
    flex: 1;
    margin-right: 0;
    border-right: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* 计算电量按钮样式 */
.pwt-electricity-bill-calculator #pwt-calculate-fixed-consumption,
.pwt-electricity-bill-calculator #pwt-calculate-tiered-consumption,
.pwt-electricity-bill-calculator .pwt-calculate-tou-consumption {
    padding: 8px 15px;
    font-size: 0.9em;
    white-space: nowrap;
    background-color: #3a7bc2;
    color: white;
    border: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.pwt-electricity-bill-calculator #pwt-calculate-fixed-consumption:hover,
.pwt-electricity-bill-calculator #pwt-calculate-tiered-consumption:hover,
.pwt-electricity-bill-calculator .pwt-calculate-tou-consumption:hover {
    background-color: #2c5f9e;
}

.pwt-electricity-bill-calculator label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 0.95em;
}

.pwt-electricity-bill-calculator .pwt-input,
.pwt-electricity-bill-calculator .pwt-select {
    width: 100%;
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    font-size: 1em;
    line-height: 1.5;
    background-color: #fff;
}

.pwt-electricity-bill-calculator .pwt-input:focus,
.pwt-electricity-bill-calculator .pwt-select:focus {
    border-color: #3a7bc2;
    box-shadow: 0 0 0 3px rgba(58,123,194,0.15);
    outline: none;
}

/* 错误提示样式 */
.pwt-electricity-bill-calculator .pwt-input-error {
    border-color: #ff5252 !important;
    box-shadow: 0 0 0 1px #ff5252 !important;
}

.pwt-electricity-bill-calculator .pwt-error-message {
    color: #ff5252;
    font-size: 0.85em;
    margin-top: 4px;
    display: none;
    animation: pwt-error-appear 0.2s ease-in-out;
    position: absolute;
}

@keyframes pwt-error-appear {
    from {opacity: 0; transform: translateY(-5px);}
    to {opacity: 1; transform: translateY(0);}
}

.pwt-electricity-bill-calculator .pwt-button {
    display: inline-block;
    padding: 6px 18px;

    background-color: #3a7bc2;
    color: white;
    border: none;

    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 1em;
    line-height: 1.5;
    text-align: center;

}

.pwt-electricity-bill-calculator .pwt-button:hover {
    background-color: #2c5f9e;
    box-shadow: 0 4px 8px rgba(58,123,194,0.3);
    transform: translateY(-1px);
}

.pwt-electricity-bill-calculator .pwt-button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(58,123,194,0.2);
}

.pwt-electricity-bill-calculator .pwt-button-secondary {
    background-color: #f8f9fa;
    color: #4a4a4a;
    border: 1px solid #d9d9d9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.pwt-electricity-bill-calculator .pwt-button-secondary:hover {
    background-color: #f1f3f5;
    border-color: #c9c9c9;
}

/* 电价配置部分 */
.pwt-electricity-bill-calculator .pwt-tariff-section {
    margin-top: 20px;
    padding: 20px;
    border: none;
    border-radius: 8px;
    background-color: #f5f7fa;
    box-shadow: inset 0 1px 5px rgba(0,0,0,0.05);
}

/* 操作按钮组 */
.pwt-electricity-bill-calculator .pwt-action-group {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 阶梯电价和分时电价删除按钮 */
.pwt-electricity-bill-calculator .pwt-remove-tier,
.pwt-electricity-bill-calculator .pwt-remove-tou {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: all 0.2s ease;
    color: #ff5252;
}

.pwt-electricity-bill-calculator .pwt-remove-tier:before,
.pwt-electricity-bill-calculator .pwt-remove-tou:before {
    content: "×";
    font-size: 20px;
    line-height: 1;
}

.pwt-electricity-bill-calculator .pwt-remove-tier:hover,
.pwt-electricity-bill-calculator .pwt-remove-tou:hover {
    color: white;
    background-color: #ff5252;
}

/* 阶梯电价和分时电价表格 */
.pwt-electricity-bill-calculator .pwt-tiered-rates,
.pwt-electricity-bill-calculator .pwt-tou-rates {
    margin-bottom: 20px;
}

.pwt-electricity-bill-calculator .pwt-tiered-rate-row,
.pwt-electricity-bill-calculator .pwt-tou-rate-row {
    flex-wrap: wrap;
    margin: 0 -10px 15px;
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.pwt-electricity-bill-calculator .pwt-tiered-rate-row:hover,
.pwt-electricity-bill-calculator .pwt-tou-rate-row:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.pwt-electricity-bill-calculator .pwt-tiered-rate-row .pwt-form-group,
.pwt-electricity-bill-calculator .pwt-tou-rate-row .pwt-form-group {
    flex: 1;
    
    margin: 0 10px;
}

/* 结果区域 */
.pwt-electricity-bill-calculator .pwt-result-container {
    margin-top: 25px;
    padding: 20px;
    border: none;
    border-radius: 8px;
    background-color: #f0f5ff;
    box-shadow: 0 2px 8px rgba(58,123,194,0.1);
    position: relative;
    overflow: hidden;
}

.pwt-electricity-bill-calculator .pwt-result-container:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: #3a7bc2;
}

.pwt-electricity-bill-calculator .pwt-result-item {
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(58,123,194,0.15);
}

.pwt-electricity-bill-calculator .pwt-result-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.pwt-electricity-bill-calculator .pwt-result-label {
    min-width: 180px;
    font-weight: 500;
    color: #555;
}

.pwt-electricity-bill-calculator .pwt-result-value {
    font-weight: 700;
    font-size: 1.1em;
    color: #3a7bc2;
    margin-right: 5px;
}

/* 电器分析器样式 */
.pwt-electricity-bill-calculator .pwt-notice {
    background-color: #e7f2fd;
    border-left: 4px solid #3a7bc2;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    font-size: 0.95em;
    line-height: 1.6;
}

.pwt-electricity-bill-calculator .pwt-appliance-table-container {
    overflow-x: auto;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.pwt-electricity-bill-calculator .pwt-appliance-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
    border-radius: 8px;
    overflow: hidden;
}

.pwt-electricity-bill-calculator .pwt-appliance-table th,
.pwt-electricity-bill-calculator .pwt-appliance-table td {
    padding: 5px 5px;
    border: none;
    text-align: left;
    min-width: 85px;
    max-width: 100px;
    font-size: 16px;
    line-height: 1.5;
    border-bottom: 1px solid #eaeaea;
}

.pwt-electricity-bill-calculator .pwt-appliance-table tr:last-child td {
    border-bottom: none;
}

.pwt-electricity-bill-calculator .pwt-appliance-table th {
    background-color: #3a7bc2;
    color: white;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.pwt-electricity-bill-calculator .pwt-appliance-table tr:nth-child(even) {
    background-color: #f9fafc;
}

.pwt-electricity-bill-calculator .pwt-appliance-table tr:hover {
    background-color: #f0f5ff;
}

.pwt-electricity-bill-calculator .pwt-appliance-table tfoot td {
    font-weight: 600;
    background-color: #eef2f9;
    color: #333;
    border-top: 2px solid #d8e0ef;
}

.pwt-electricity-bill-calculator .pwt-text-right {
    text-align: right!important;
}

.pwt-electricity-bill-calculator .pwt-usage-column {
    min-width: 60px;
}

.pwt-electricity-bill-calculator .pwt-remove-row {
    color: #f00;
    cursor: pointer;
    margin-top:25px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
   
}

.pwt-electricity-bill-calculator .pwt-remove-row:before {
    content: "×";
    font-size: 18px;
    line-height: 1;
}

.pwt-electricity-bill-calculator .pwt-remove-row:hover {
    color: white;
    background-color: #c24d4d;
}
.pwt-analyzer-section h4{font-size: 16px;}

/* 响应式样式 */
@media (max-width: 768px) {
    .pwt-electricity-bill-calculator .pwt-section {
        padding: 20px 15px;
    }

    .pwt-electricity-bill-calculator .pwt-tiered-rate-row,
    .pwt-electricity-bill-calculator .pwt-tou-rate-row {
        flex-direction: column;
        padding: 15px 10px;
    }
    
    .pwt-electricity-bill-calculator .pwt-tiered-rate-row .pwt-form-group,
    .pwt-electricity-bill-calculator .pwt-tou-rate-row .pwt-form-group {
        margin-bottom: 15px;
        margin-right: 0;
        margin-left: 0;
    }
    
    .pwt-electricity-bill-calculator .pwt-result-item {
        flex-direction: column;
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    .pwt-electricity-bill-calculator .pwt-result-label {
        margin-bottom: 5px;
    }

    .pwt-electricity-bill-calculator .pwt-input-with-button {
        flex-direction: column;
        border-radius: 6px;
        box-shadow: none;
    }

    .pwt-electricity-bill-calculator .pwt-input-with-button .pwt-input {
        margin-right: 0;
        margin-bottom: 8px;
        border-radius: 6px;
        border: 1px solid #d9d9d9;
    }

    .pwt-electricity-bill-calculator #pwt-calculate-fixed-consumption,
    .pwt-electricity-bill-calculator #pwt-calculate-tiered-consumption,
    .pwt-electricity-bill-calculator .pwt-calculate-tou-consumption {
        width: 100%;
        border-radius: 6px;
        padding: 10px;
    }

    .pwt-electricity-bill-calculator .pwt-appliance-table th,
    .pwt-electricity-bill-calculator .pwt-appliance-table td {
        padding: 10px 8px;
        font-size: 14px;
    }

    .pwt-electricity-bill-calculator .pwt-appliance-table th {
        line-height: 1em;
        font-size: 16px;
    }

    .pwt-electricity-bill-calculator .pwt-notice {
        padding: 12px 15px;
    }
} 

/* 模态窗口样式 */
.pwt-modal.pwt-electricity-bill-calculator {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    padding: 0;
    margin: 0;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5); /* 添加半透明灰色背景 */
    backdrop-filter: blur(2px); /* 添加轻微模糊效果 */
}

.pwt-modal.pwt-electricity-bill-calculator .pwt-modal-content {
    position: relative;
    background-color: #ffffff;
    padding: 0;
    border: none;
    border-radius: 10px;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    animation: pwt-modal-appear 0.3s;
    text-align: left;
    overflow: hidden;
}

@keyframes pwt-modal-appear {
    from {opacity: 0; transform: translateY(-30px) scale(0.95);}
    to {opacity: 1; transform: translateY(0) scale(1);}
}

.pwt-modal.pwt-electricity-bill-calculator .pwt-modal-header {
    padding: 20px;
    background-color: #3a7bc2;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    position: relative;
    color: white;
    box-shadow: 0 2px 10px rgba(58,123,194,0.2);
}

.pwt-modal.pwt-electricity-bill-calculator .pwt-modal-header h4 {
    margin: 0;
    font-size: 1.3em;
    color: white;
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.pwt-modal.pwt-electricity-bill-calculator .pwt-modal-close {
    position: absolute;
    right: 18px;
    top: 18px;
    color: rgba(255,255,255,0.8);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 18px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.pwt-modal.pwt-electricity-bill-calculator .pwt-modal-close:hover {
    color: #fff;
    background-color: rgba(255,255,255,0.2);
}

.pwt-modal.pwt-electricity-bill-calculator .pwt-modal-body {
    padding: 25px;
    background-color: #fff;
}

.pwt-modal.pwt-electricity-bill-calculator .pwt-result-container {
    margin-top: 25px;
    padding: 18px;
    background-color: #f0f5ff;
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(58,123,194,0.1);
}

.pwt-modal.pwt-electricity-bill-calculator .pwt-result-container h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #3a7bc2;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.pwt-modal.pwt-electricity-bill-calculator .pwt-result-container h4:before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 16px;
    background-color: #3a7bc2;
    margin-right: 8px;
    border-radius: 2px;
}

.pwt-modal.pwt-electricity-bill-calculator .pwt-result-item {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 12px 15px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.pwt-modal.pwt-electricity-bill-calculator .pwt-result-label {
    font-weight: 500;
    margin-right: 10px;
    color: #555;
}

.pwt-modal.pwt-electricity-bill-calculator .pwt-result-value {
    font-size: 22px;
    color: #3a7bc2;
    font-weight: bold;
    margin-right: 5px;
}

.pwt-modal.pwt-electricity-bill-calculator .pwt-modal-footer {
    padding: 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #eaeaea;
    border-radius: 0 0 10px 10px;
    text-align: right;
    display: flex;
    justify-content: flex-end;
}

.pwt-modal.pwt-electricity-bill-calculator .pwt-modal-footer .pwt-button {
    margin-left: 12px;
} 