/* 积分兑换余额插件 - 前端样式 */

.pbe-exchange-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.pbe-exchange-header h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
}

.pbe-description {
    color: #666;
    margin-bottom: 20px;
}

.pbe-current-status {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.pbe-status-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.pbe-label {
    font-weight: bold;
    margin-right: 10px;
    color: #555;
}

.pbe-value {
    font-size: 18px;
    font-weight: bold;
}

.pbe-points {
    color: #e74c3c;
}

.pbe-balance {
    color: #27ae60;
}

.pbe-exchange-rule {
    background: #e8f4fd;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

.pbe-exchange-rule p {
    margin: 0 0 10px 0;
    font-weight: bold;
    color: #2c3e50;
}

.pbe-exchange-rule ul {
    margin: 0;
    padding-left: 20px;
    color: #555;
}

.pbe-exchange-rule li {
    margin-bottom: 5px;
}

.pbe-form-group {
    margin-bottom: 20px;
}

.pbe-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.pbe-form-group input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: #fff;
    color: #333;
}

.pbe-form-group input[type="number"]:focus {
    outline: none;
    border-color: #3498db;
}

.pbe-preview {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.pbe-preview-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
}

.pbe-preview-item:last-child {
    margin-bottom: 0;
    font-weight: bold;
    font-size: 16px;
    color: #2c3e50;
    padding-top: 8px;
    border-top: 1px solid #dee2e6;
}

.pbe-form-actions {
    text-align: center;
    margin-bottom: 20px;
}

.pbe-submit-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    min-width: 120px;
}

.pbe-submit-button:hover {
    background: #2980b9;
}

.pbe-submit-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.pbe-message {
    padding: 12px;
    border-radius: 5px;
    margin-top: 15px;
    font-weight: bold;
}

.pbe-message.pbe-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.pbe-message.pbe-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.pbe-notice {
    padding: 15px;
    border-radius: 5px;
    margin: 20px auto;
    max-width: 600px;
    font-weight: bold;
    text-align: center;
}

.pbe-notice.pbe-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
    .pbe-exchange-container {
        background: #2b2b2b;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .pbe-exchange-header h3 {
        color: #fff;
    }
    
    .pbe-description {
        color: #b0b0b0;
    }
    
    .pbe-current-status {
        background: #333;
        color: #e0e0e0;
    }
    
    .pbe-label {
        color: #b0b0b0;
    }
    
    .pbe-exchange-rule {
        background: #1a3a52;
        border-left-color: #5dade2;
    }
    
    .pbe-exchange-rule p {
        color: #e0e0e0;
    }
    
    .pbe-exchange-rule ul {
        color: #b0b0b0;
    }
    
    .pbe-form-group label {
        color: #e0e0e0;
    }
    
    .pbe-form-group input[type="number"] {
        background: #333;
        border-color: #555;
        color: #e0e0e0;
    }
    
    .pbe-form-group input[type="number"]:focus {
        border-color: #5dade2;
    }
    
    .pbe-preview {
        background: #333;
        border-color: #555;
    }
    
    .pbe-preview-item {
        color: #e0e0e0;
    }
    
    .pbe-preview-item:last-child {
        color: #fff;
        border-top-color: #555;
    }
    
    .pbe-submit-button {
        background: #5dade2;
    }
    
    .pbe-submit-button:hover {
        background: #4a9bd1;
    }
    
    .pbe-submit-button:disabled {
        background: #666;
    }
    
    .pbe-message.pbe-success {
        background: #1e3a2e;
        color: #90ee90;
        border-color: #2d5a3d;
    }
    
    .pbe-message.pbe-error {
        background: #3d1e20;
        color: #ff7f7f;
        border-color: #5a2d2d;
    }
    
    .pbe-notice.pbe-error {
        background: #3d1e20;
        color: #ff7f7f;
        border-color: #5a2d2d;
    }
}

/* 暗色模式主题类支持 */
.dark .pbe-exchange-container,
body.dark .pbe-exchange-container,
[data-theme="dark"] .pbe-exchange-container {
    background: #2b2b2b;
    border-color: #444;
    color: #e0e0e0;
}

.dark .pbe-exchange-header h3,
body.dark .pbe-exchange-header h3,
[data-theme="dark"] .pbe-exchange-header h3 {
    color: #fff;
}

.dark .pbe-description,
body.dark .pbe-description,
[data-theme="dark"] .pbe-description {
    color: #b0b0b0;
}

.dark .pbe-current-status,
body.dark .pbe-current-status,
[data-theme="dark"] .pbe-current-status {
    background: #333;
    color: #e0e0e0;
}

.dark .pbe-label,
body.dark .pbe-label,
[data-theme="dark"] .pbe-label {
    color: #b0b0b0;
}

.dark .pbe-exchange-rule,
body.dark .pbe-exchange-rule,
[data-theme="dark"] .pbe-exchange-rule {
    background: #1a3a52;
    border-left-color: #5dade2;
}

.dark .pbe-exchange-rule p,
body.dark .pbe-exchange-rule p,
[data-theme="dark"] .pbe-exchange-rule p {
    color: #e0e0e0;
}

.dark .pbe-exchange-rule ul,
body.dark .pbe-exchange-rule ul,
[data-theme="dark"] .pbe-exchange-rule ul {
    color: #b0b0b0;
}

.dark .pbe-form-group label,
body.dark .pbe-form-group label,
[data-theme="dark"] .pbe-form-group label {
    color: #e0e0e0;
}

.dark .pbe-form-group input[type="number"],
body.dark .pbe-form-group input[type="number"],
[data-theme="dark"] .pbe-form-group input[type="number"] {
    background: #333;
    border-color: #555;
    color: #e0e0e0;
}

.dark .pbe-form-group input[type="number"]:focus,
body.dark .pbe-form-group input[type="number"]:focus,
[data-theme="dark"] .pbe-form-group input[type="number"]:focus {
    border-color: #5dade2;
}

.dark .pbe-preview,
body.dark .pbe-preview,
[data-theme="dark"] .pbe-preview {
    background: #333;
    border-color: #555;
}

.dark .pbe-preview-item,
body.dark .pbe-preview-item,
[data-theme="dark"] .pbe-preview-item {
    color: #e0e0e0;
}

.dark .pbe-preview-item:last-child,
body.dark .pbe-preview-item:last-child,
[data-theme="dark"] .pbe-preview-item:last-child {
    color: #fff;
    border-top-color: #555;
}

.dark .pbe-submit-button,
body.dark .pbe-submit-button,
[data-theme="dark"] .pbe-submit-button {
    background: #5dade2;
}

.dark .pbe-submit-button:hover,
body.dark .pbe-submit-button:hover,
[data-theme="dark"] .pbe-submit-button:hover {
    background: #4a9bd1;
}

.dark .pbe-submit-button:disabled,
body.dark .pbe-submit-button:disabled,
[data-theme="dark"] .pbe-submit-button:disabled {
    background: #666;
}

.dark .pbe-message.pbe-success,
body.dark .pbe-message.pbe-success,
[data-theme="dark"] .pbe-message.pbe-success {
    background: #1e3a2e;
    color: #90ee90;
    border-color: #2d5a3d;
}

.dark .pbe-message.pbe-error,
body.dark .pbe-message.pbe-error,
[data-theme="dark"] .pbe-message.pbe-error {
    background: #3d1e20;
    color: #ff7f7f;
    border-color: #5a2d2d;
}

.dark .pbe-notice.pbe-error,
body.dark .pbe-notice.pbe-error,
[data-theme="dark"] .pbe-notice.pbe-error {
    background: #3d1e20;
    color: #ff7f7f;
    border-color: #5a2d2d;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .pbe-exchange-container {
        margin: 10px;
        padding: 15px;
    }
    
    .pbe-current-status {
        flex-direction: column;
    }
    
    .pbe-status-item {
        justify-content: space-between;
        width: 100%;
    }
    
    .pbe-preview-item {
        font-size: 13px;
    }
    
    .pbe-submit-button {
        width: 100%;
        padding: 15px;
    }
}

/* 紧凑模式样式 - 用于个人中心集成 */
.pbe-exchange-container.pbe-compact {
    max-width: none;
    margin: 0;
    padding: 15px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.pbe-compact .pbe-exchange-header h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.pbe-compact-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.pbe-compact-stats .pbe-stat {
    text-align: center;
    flex: 1;
}

.pbe-compact-stats .pbe-stat .value {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 2px;
}

.pbe-compact-stats .pbe-stat .label {
    display: block;
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
}

.pbe-compact-stats .pbe-arrow {
    font-size: 16px;
    color: #6c757d;
    flex-shrink: 0;
}

.pbe-compact-form .pbe-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.pbe-compact-form input[type="number"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    color: #333;
}

.pbe-compact-form input[type="number"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.pbe-compact-form .pbe-submit-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.pbe-compact-form .pbe-submit-button:hover {
    background: #2980b9;
}

.pbe-compact-form .pbe-submit-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.pbe-compact-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #6c757d;
}

.pbe-compact-info .pbe-ratio {
    font-weight: 500;
}

.pbe-compact-info .pbe-preview {
    color: #28a745;
    font-weight: 500;
}

/* 紧凑模式暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .pbe-compact .pbe-exchange-header h4 {
        color: #e0e0e0;
    }
    
    .pbe-compact-stats {
        background: #333;
        border-color: #555;
    }
    
    .pbe-compact-stats .pbe-stat .value {
        color: #fff;
    }
    
    .pbe-compact-stats .pbe-stat .label {
        color: #aaa;
    }
    
    .pbe-compact-stats .pbe-arrow {
        color: #aaa;
    }
    
    .pbe-compact-form input[type="number"] {
        background: #333;
        border-color: #555;
        color: #e0e0e0;
    }
    
    .pbe-compact-form input[type="number"]:focus {
        border-color: #5dade2;
        box-shadow: 0 0 0 2px rgba(93, 173, 226, 0.2);
    }
    
    .pbe-compact-form .pbe-submit-button {
        background: #5dade2;
    }
    
    .pbe-compact-form .pbe-submit-button:hover {
        background: #4a9bd1;
    }
    
    .pbe-compact-form .pbe-submit-button:disabled {
        background: #666;
    }
    
    .pbe-compact-info {
        color: #aaa;
    }
    
    .pbe-compact-info .pbe-preview {
        color: #90ee90;
    }
}

/* 紧凑模式主题类暗色模式支持 */
.dark .pbe-compact .pbe-exchange-header h4,
body.dark .pbe-compact .pbe-exchange-header h4,
[data-theme="dark"] .pbe-compact .pbe-exchange-header h4 {
    color: #e0e0e0;
}

.dark .pbe-compact-stats,
body.dark .pbe-compact-stats,
[data-theme="dark"] .pbe-compact-stats {
    background: #333;
    border-color: #555;
}

.dark .pbe-compact-stats .pbe-stat .value,
body.dark .pbe-compact-stats .pbe-stat .value,
[data-theme="dark"] .pbe-compact-stats .pbe-stat .value {
    color: #fff;
}

.dark .pbe-compact-stats .pbe-stat .label,
body.dark .pbe-compact-stats .pbe-stat .label,
[data-theme="dark"] .pbe-compact-stats .pbe-stat .label {
    color: #aaa;
}

.dark .pbe-compact-stats .pbe-arrow,
body.dark .pbe-compact-stats .pbe-arrow,
[data-theme="dark"] .pbe-compact-stats .pbe-arrow {
    color: #aaa;
}

.dark .pbe-compact-form input[type="number"],
body.dark .pbe-compact-form input[type="number"],
[data-theme="dark"] .pbe-compact-form input[type="number"] {
    background: #333;
    border-color: #555;
    color: #e0e0e0;
}

.dark .pbe-compact-form input[type="number"]:focus,
body.dark .pbe-compact-form input[type="number"]:focus,
[data-theme="dark"] .pbe-compact-form input[type="number"]:focus {
    border-color: #5dade2;
    box-shadow: 0 0 0 2px rgba(93, 173, 226, 0.2);
}

.dark .pbe-compact-form .pbe-submit-button,
body.dark .pbe-compact-form .pbe-submit-button,
[data-theme="dark"] .pbe-compact-form .pbe-submit-button {
    background: #5dade2;
}

.dark .pbe-compact-form .pbe-submit-button:hover,
body.dark .pbe-compact-form .pbe-submit-button:hover,
[data-theme="dark"] .pbe-compact-form .pbe-submit-button:hover {
    background: #4a9bd1;
}

.dark .pbe-compact-form .pbe-submit-button:disabled,
body.dark .pbe-compact-form .pbe-submit-button:disabled,
[data-theme="dark"] .pbe-compact-form .pbe-submit-button:disabled {
    background: #666;
}

.dark .pbe-compact-info,
body.dark .pbe-compact-info,
[data-theme="dark"] .pbe-compact-info {
    color: #aaa;
}

.dark .pbe-compact-info .pbe-preview,
body.dark .pbe-compact-info .pbe-preview,
[data-theme="dark"] .pbe-compact-info .pbe-preview {
    color: #90ee90;
}

/* 紧凑模式响应式设计 */
@media (max-width: 768px) {
    .pbe-compact-form .pbe-input-group {
        flex-direction: column;
    }
    
    .pbe-compact-form .pbe-submit-button {
        width: 100%;
        padding: 10px;
    }
    
    .pbe-compact-info {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}

/* 方向选择器样式 */
.pbe-direction-selector {
    margin-bottom: 15px;
}

.pbe-direction-tabs {
    display: flex;
    gap: 2px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 2px;
}

.pbe-direction-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #6c757d;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.pbe-direction-tab:hover {
    background: #e9ecef;
    color: #495057;
}

.pbe-direction-tab.active {
    background: #3498db;
    color: white;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

.pbe-direction-tab .fa {
    margin-right: 4px;
}

/* 方向选择器暗色模式 */
@media (prefers-color-scheme: dark) {
    .pbe-direction-tabs {
        background: #333;
        border-color: #555;
    }
    
    .pbe-direction-tab {
        color: #aaa;
    }
    
    .pbe-direction-tab:hover {
        background: #444;
        color: #e0e0e0;
    }
    
    .pbe-direction-tab.active {
        background: #5dade2;
        color: white;
        box-shadow: 0 2px 4px rgba(93, 173, 226, 0.3);
    }
}

/* 方向选择器主题类暗色模式支持 */
.dark .pbe-direction-tabs,
body.dark .pbe-direction-tabs,
[data-theme="dark"] .pbe-direction-tabs {
    background: #333;
    border-color: #555;
}

.dark .pbe-direction-tab,
body.dark .pbe-direction-tab,
[data-theme="dark"] .pbe-direction-tab {
    color: #aaa;
}

.dark .pbe-direction-tab:hover,
body.dark .pbe-direction-tab:hover,
[data-theme="dark"] .pbe-direction-tab:hover {
    background: #444;
    color: #e0e0e0;
}

.dark .pbe-direction-tab.active,
body.dark .pbe-direction-tab.active,
[data-theme="dark"] .pbe-direction-tab.active {
    background: #5dade2;
    color: white;
    box-shadow: 0 2px 4px rgba(93, 173, 226, 0.3);
}