/**
 * 日期计算器工具样式
 */

/* 基本样式 */
.pwt-date-calculator {
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    padding: 25px;
    background-color: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}
.pwt-date_calculator{max-width: 900px!important;}
/* 头部标题居中 */
.pwt-tool-container .pwt-tool-title,
.pwt-tool-container .pwt-tool-description {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.pwt-tool-title {
    color: #2271b1;
    margin-bottom: 15px;
    font-size: 1.6em;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.pwt-tool-description {
    color: #666;
    margin-bottom: 25px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* 模式选择 - 重点突出 */
.pwt-mode-selection {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    padding: 15px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e5e5e5;
    position: relative;
}

.pwt-mode-selection:before {
    content: '';
    position: absolute;
    top: -5px;
    left: 20px;
    right: 20px;
    height: 5px;
    background: linear-gradient(90deg, rgba(34,113,177,0.3) 0%, rgba(34,113,177,0.7) 50%, rgba(34,113,177,0.3) 100%);
    border-radius: 5px 5px 0 0;
}

.pwt-mode-selection:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.pwt-mode-selection .pwt-radio {
    margin: 0 20px;
    font-weight: 500;
    cursor: pointer;
    padding: 12px 22px;
    border-radius: 6px;
    transition: all 0.25s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.pwt-mode-selection .pwt-radio:hover {
    background-color: #f5f5f5;
    border-color: #e0e0e0;
}

.pwt-mode-selection input[type="radio"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.pwt-mode-selection input[type="radio"]:checked + span {
    color: #2271b1;
    font-weight: 600;
}

.pwt-mode-selection .pwt-radio:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #2271b1;
    transition: width 0.3s ease;
}

.pwt-mode-selection .pwt-radio:has(input:checked):after {
    width: 100%;
}

/* 日期选择器 - 提高可读性 */
.pwt-date-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding: 18px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e5e5;
}

.pwt-date-part {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 120px;
}

.pwt-date-part label {
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #333;
    font-weight: 600;
    position: relative;
    padding-left: 5px;
}

.pwt-year-select,
.pwt-month-select,
.pwt-day-select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95em;
    color: #333;
    background-color: #f8f8f8;
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6"><path d="M0,0 L12,0 L6,6 Z" fill="%23666"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 35px;
}

.pwt-year-select:hover,
.pwt-month-select:hover,
.pwt-day-select:hover {
    border-color: #bbb;
    background-color: #fff;
}

.pwt-year-select:focus,
.pwt-month-select:focus,
.pwt-day-select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34,113,177,0.2);
    background-color: #fff;
}

/* 间隔输入 - 更紧凑 */
.pwt-interval-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-start;
    margin-top: 15px;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e5e5;
    justify-content: space-evenly;
}

.pwt-interval-part {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    min-width: 85px;
    max-width: 120px;
    margin: 0 5px;
}

.pwt-interval-part label {
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #333;
    font-weight: 600;
    white-space: nowrap;
    position: relative;
    padding-left: 5px;
    text-align: center;
}

.pwt-interval-part label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 3px;
    background-color: #2271b1;
    opacity: 0.6;
    border-radius: 3px;
}

.pwt-input {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 100%;
    font-size: 14px;
    text-align: center;
    background-color: #f8f8f8;
    transition: all 0.3s ease;
}

.pwt-input:hover {
    border-color: #bbb;
    background-color: #fff;
}

.pwt-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34,113,177,0.2);
    background-color: #fff;
}

/* 结果容器 - 更加醒目 */
.pwt-result-container {
    margin-top: 30px;
    padding: 22px;
    background-color: #ffffff;
    border-radius: 10px;
    display: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #2271b1;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.pwt-result-container h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2271b1;
    font-size: 1.25em;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
    position: relative;
}

.pwt-result-container h4:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 3px;
    background-color: #2271b1;
    border-radius: 3px;
}

.pwt-result-item {
    margin-bottom: 12px;
    display: flex;
    padding: 10px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    align-items: center;
}

.pwt-result-item:hover {
    background-color: #f8f8f8;
}

.pwt-result-label {
    font-weight: 600;
    min-width: 100px;
    color: #444;
}

.pwt-result-value {
    font-weight: 500;
    color: #2271b1;
    font-size: 0.95em;
    line-height: 1.5;
    word-break: break-word;
}

/* 农历信息 */
.pwt-lunar-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.pwt-lunar-info h5 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2271b1;
    font-size: 1.1em;
    font-weight: 600;
}

.pwt-lunar-item {
    margin-bottom: 10px;
    display: flex;
    padding: 8px;
    border-radius: 6px;
}

.pwt-lunar-item:hover {
    background-color: #f9f9f9;
}

.pwt-lunar-label {
    font-weight: 600;
    min-width: 120px;
    color: #444;
}

.pwt-lunar-value {
    font-weight: 500;
    color: #2271b1;
}

/* 按钮样式 - 更醒目 */
.pwt-form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

.pwt-button {
    padding: 10px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 120px;
    text-align: center;
    letter-spacing: 0.3px;
}

.pwt-calculate-btn {
    background-color: #2271b1;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pwt-calculate-btn:hover {
    background-color: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 重置按钮 - 增强对比度 */
.pwt-reset-btn {
    background-color: #f7f7f7 !important;
    color: #333333 !important;
    border: 1px solid #dddddd !important;
    font-weight: 500 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.pwt-reset-btn:hover {
    background-color: #f0f0f0 !important;
    color: #000000 !important;
    transform: translateY(-2px);
    border-color: #cccccc !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08) !important;
}

/* 错误消息 */
.pwt-error-message {
    padding: 12px 15px;
    margin-bottom: 20px;
    background-color: #fff5f5;
    color: #d32f2f;
    border-left: 4px solid #d32f2f;
    border-radius: 4px;
    font-weight: 500;
}

/* 标题和描述 */
.pwt-diff-section h4,
.pwt-add-section h4 {
    margin-top: 15px;
    margin-bottom: 20px;
    color: #2271b1;
    font-size: 1.15em;
    font-weight: 600;
    padding-left: 12px;
    border-left: 3px solid #2271b1;
    position: relative;
}

/* 操作类型 */
.pwt-add-section > div {
    padding: 18px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e5e5;
    margin-bottom: 20px;
}

.pwt-operation-choices {
    display: flex;
    gap: 25px;
    margin-bottom: 15px;
}

.pwt-operation-choices label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.pwt-operation-choices label:hover {
    background-color: #f5f5f5;
}

.pwt-operation-choices label span {
    font-size: 0.9em;
}

.pwt-operation-choices input[type="radio"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.pwt-operation-choices input[type="radio"]:checked + span {
    color: #2271b1;
    font-weight: 600;
}

/* 响应式样式 - 优化小屏幕体验 */
@media (max-width: 768px) {
    /* 基础容器 */
    .pwt-date-calculator {
        padding: 15px 12px;
    }

    /* 标题 */
    .pwt-tool-title {
        font-size: 1.3em;
    }

    /* 模式选择 */
    .pwt-mode-selection {
        padding: 10px;
        flex-direction: row; /* 保持水平布局更易用 */
        justify-content: space-around;
    }
    
    .pwt-mode-selection .pwt-radio {
        margin: 0;
        padding: 12px 10px;
        text-align: center;
    }
    
    /* 日期选择器 - 更紧凑的布局 */
    .pwt-date-selector {
        padding: 12px;
        gap: 10px;
    }
    
    .pwt-date-part {
        min-width: 90px;
    }
    
    .pwt-year-select,
    .pwt-month-select,
    .pwt-day-select {
        padding: 8px 25px 8px 10px;
        font-size: 0.95em;
        background-position: right 8px center;
    }
    
    /* 间隔输入 - 更好的小屏幕布局 */
    .pwt-interval-inputs {
        padding: 15px 10px;
        justify-content: space-between;
        gap: 6px;
    }
    
    .pwt-interval-part {
        min-width: 30%;
        max-width: 30%;
        flex-basis: 30%;
        margin: 0;
    }
    
    .pwt-interval-part label {
        font-size: 0.85em;
        text-align: center;
        padding-left: 0;
        margin-bottom: 6px;
    }
    
    .pwt-interval-part label:before {
        display: none;
    }
    
    .pwt-input {
        padding: 6px 5px;
        width: 80%!important;
        font-size: 0.9em;
    }
    
    /* 结果显示 */
    .pwt-result-container {
        padding: 15px;
    }
    
    .pwt-result-item {
        flex-direction: column;
        margin-bottom: 15px;
        background-color: #f9f9f9;
        padding: 10px;
        border-radius: 6px;
    }
    
    .pwt-result-label {
        margin-bottom: 5px;
        color: #666;
        font-size: 0.85em;
    }
    
    .pwt-result-value {
        font-size: 0.95em;
        line-height: 1.4;
    }
    
    /* 农历信息 */
    .pwt-lunar-item {
        flex-direction: column;
        margin-bottom: 15px;
        background-color: #f9f9f9;
        padding: 10px;
        border-radius: 6px;
    }
    
    .pwt-lunar-label {
        margin-bottom: 5px;
        color: #666;
        font-size: 0.85em;
    }
    
    .pwt-lunar-value {
        font-size: 0.95em;
        line-height: 1.4;
    }
    
    /* 按钮 */
    .pwt-form-actions {
        margin-top: 20px;
    }
    
    .pwt-button {
        flex: 1;
        padding: 12px 15px;
        font-size: 1em;
    }
    
    /* 操作选择 */
    .pwt-operation-choices {
        gap: 15px;
    }
    
    .pwt-operation-choices label {
        padding: 6px 10px;
    }
    
    .pwt-operation-choices label span {
        font-size: 0.85em;
    }
}

/* 移动端优化 - 处理非常小的屏幕 */
@media (max-width: 480px) {
    .pwt-mode-selection {
        flex-direction: column;
        gap: 8px;
    }
    
    .pwt-date-selector {
        flex-direction: column;
    }
    
    .pwt-date-part {
        width: 100%;
    }
    
    .pwt-interval-inputs {
        justify-content: space-between;
        padding: 10px 8px;
    }
    
    .pwt-interval-part {
        min-width: 30%;
        max-width: 30%;
        flex-basis: 30%;
    }
    
    .pwt-interval-part label {
        font-size: 0.8em;
        margin-bottom: 4px;
    }
    
    .pwt-input {
        padding: 5px 2px;
        
        width: 70% !important;
        
        font-size: 0.85em;
    }
    
    .pwt-operation-choices {
        gap: 8px;
    }
    
    .pwt-operation-choices label {
        padding: 5px 8px;
    }
    
    .pwt-operation-choices label span {
        font-size: 0.8em;
    }
    
    .pwt-result-value {
        font-size: 0.9em;
        line-height: 1.35;
    }
}

/* 移动端优化类 */
.pwt-mobile-optimized .pwt-button {
    padding: 12px 15px;
    font-size: 1em;
    width: 100%;
    max-width: 150px;
}

.pwt-mobile-optimized .pwt-form-actions {
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: center;
}

.pwt-mobile-optimized .pwt-date-selector {
    flex-wrap: wrap;
}

.pwt-mobile-optimized .pwt-date-part {
    flex-basis: 30%;
    min-width: 0;
}

.pwt-mobile-optimized .pwt-interval-inputs {
    padding: 12px 8px;
    justify-content: space-between;
}

.pwt-mobile-optimized .pwt-interval-part {
    flex-basis: 30%;
    min-width: 30%;
    max-width: 30%;
    margin: 0;
}

