/*
Theme Name: PayAI
Theme URI: https://newpay.la
Author: PayAI Team
Author URI: https://newpay.la
Description: PayAI Theme for NewPay Platform
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: payai
*/

:root {
    --primary-color: #2563eb;
    --secondary-color: #f97316;
    --background-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #334155;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
}

.navbar {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    background: linear-gradient(135deg, #1e40af, #3b82f6);
}

.logo {
    height: 40px;
}

/* Logo文字样式 */
.logo-text {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.logo-highlight {
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-item a{
    /* 字体为黑色并删除下划线 */
    color: black;
    text-decoration: none;
    width: 100%;
    height: 100%;
}
.sidebar-item.active a{
    color: #2563eb;
}

.sidebar {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    padding: 24px 24px 3px 24px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-item:hover {
    background-color: rgba(37, 99, 235, 0.1);
    transform: translateX(4px);
}

.sidebar-item.active {
    background-color: rgba(37, 99, 235, 0.15);
    color: var(--primary-color);
    font-weight: 600;
}

.sidebar-icon {
    margin-right: 14px;
    color: var(--primary-color);
    font-size: 18px;
}

.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    margin-bottom: 24px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
    padding: 18px 24px;
}

.stat-card {
    text-align: center;
    padding: 24px;
    /* background: linear-gradient(135deg, #ffffff, #f8fafc); */
}

.stat-icon {
    font-size: 36px;
    margin-bottom: 16px;
}

.stat-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}

.value-number {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(37, 99, 235, 0.2);
}
.col-lg-9 .woocommerce{
    padding: 0;
}
.currency-unit {
    font-size: 16px;
    font-weight: 600;
    margin-left: 2px;
    color: #64748b;
    background: linear-gradient(135deg, #64748b, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    top: 0;
    letter-spacing: 0.5px;
}

.stat-label {
    color: #64748b;
    font-size: 16px;
    font-weight: 500;
    margin-top: 8px;
}

.wallet-icon {
    color: var(--primary-color);
}

.credit-icon {
    color: var(--secondary-color);
}

.card-icon {
    color: #10b981;
}

.card-payment {
    display: flex;
    align-items: center;
    padding: 20px;
}

.card-logo {
    width: 80px;
    margin-right: 20px;
}

.card-details {
    flex-grow: 1;
}

.credit-card {
    border-radius: 16px;
    perspective: 1000px;
    margin-bottom: 24px;
    transition: transform 0.6s;
    position: relative;
    height: 100%;
    width: 100%;
}

.credit-card:hover {
    transform: scale(1.02);
}

.credit-card-inner {
    position: relative;
    border-radius: 16px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    height: 265px;
}

.card-number {
    font-family: monospace;
    letter-spacing: 2px;
    font-size: 22px;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

.credit-card-inner .text-white {
    text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.5);
}

.credit-card-inner .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500;
}

.credit-card-inner .text-secondary {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 600;
}

.badge-success {
    background-color: #10b981;
    color: white;
    padding: 2px 12px;
    height: 30px;
    text-align: center;
    /* 垂直居中 */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.badge-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.credit-card-inner .badge {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.table {
    border-radius: 10px;
    overflow: hidden;
}

.table th {
    background-color: #f1f5f9;
    font-weight: 600;
    color: #475569;
    padding: 14px;
}

.table td {
    padding: 14px;
    vertical-align: middle;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #60a5fa);
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e40af, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-outline-danger {
    border: 2px solid #ef4444;
    color: #ef4444;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-outline-danger:hover {
    background-color: #ef4444;
    color: white;
    transform: translateY(-2px);
}

.custom-select {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
}

.notification-bar {
    background: linear-gradient(135deg, #fecaca, #fee2e2);
    color: #b91c1c;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 500;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

.transaction-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 15px;
    font-size: 16px;
}

.transaction-income {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.transaction-expense {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.card-carousel {
    display: flex;
    flex-wrap: wrap;
    padding: 10px 5px;
    gap: 20px;
    justify-content: flex-start;
}

.card-carousel-item {
    flex: 0 0 calc(50% - 10px);
    width: calc(50% - 10px);
    /*min-width: 400px;*/
    max-width: calc(50% - 10px);
}

.card-position-left {
    margin-right: auto;
}
.card-position-right {
    margin-left: auto;
}

@media (max-width: 991.98px) {
    .card-carousel-item {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .card-carousel {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .card-carousel-item {
        flex: 0 0 calc(50% - 10px);
        width: calc(50% - 10px);
        /*min-width: 400px;*/
        max-width: calc(50% - 10px);
    }
}

@media (min-width: 1200px) {
    .card-carousel {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .card-carousel-item {
        flex: 0 0 calc(50% - 10px);
        width: calc(50% - 10px);
        /*min-width: 400px;*/
        max-width: calc(50% - 10px);
    }
}

.add-card-box {
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    height: 100%;
    transition: all 0.3s ease;
    text-align: center;
}

.add-card-box:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    cursor: pointer;
}

.add-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 24px;
}

.add-card-label {
    font-size: 16px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 15px;
}

.add-card-cost {
    font-size: 14px;
    color: #94a3b8;
}

/* 付款页面样式 */
.woocommerce {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.woocommerce-form-coupon-toggle {
    margin-bottom: 24px;
}

.woocommerce-info {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    color: var(--text-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.woocommerce-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.woocommerce-info a:hover {
    text-decoration: underline;
}

.checkout_coupon {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.checkout_coupon p {
    margin-bottom: 16px;
}

.checkout_coupon .input-text {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.checkout_coupon .input-text:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.checkout_coupon .button {
    background: linear-gradient(135deg, var(--primary-color), #60a5fa);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkout_coupon .button:hover {
    background: linear-gradient(135deg, #1e40af, var(--primary-color));
    transform: translateY(-2px);
}

.woocommerce-checkout {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.woocommerce-billing-fields h3,
.woocommerce-additional-fields h3,
#order_review_heading {
    color: var(--text-color);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-row .input-text,
.form-row select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-row .input-text:focus,
.form-row select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.woocommerce-checkout-review-order-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.woocommerce-checkout-review-order-table th {
    background-color: #f1f5f9;
    font-weight: 600;
    color: #475569;
}

.woocommerce-checkout-payment {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

.woocommerce-terms-and-conditions-wrapper {
    margin-bottom: 24px;
}

#place_order {
    background: linear-gradient(135deg, var(--primary-color), #60a5fa);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

#place_order:hover {
    background: linear-gradient(135deg, #1e40af, var(--primary-color));
    transform: translateY(-2px);
}

.return-wallet {
    background: #f1f5f9;
    color: #fff;
    border: none;
    background-color: #f97316;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px auto 0;
}

.woocommerce-EditAccountForm .woocommerce-Button{
    background: linear-gradient(135deg, var(--primary-color), #60a5fa);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}
.return-wallet:hover {
    transform: translateY(-2px);
}
.woocommerce-MyAccount-navigation{
    display: none;
}
.card-position-left {
    margin-right: auto;
}
.card-position-right {
    margin-left: auto;
}
.card-carousel-item {
    display: flex;
    /*margin-bottom: 15px;*/
}

.card-number {
    letter-spacing: 4px;
}
#update-transactions-btn{
    padding: 4px 8px;
    border-radius: 3px;
}
@media (max-width: 991px) {
    .card-detail-left {
        margin-bottom: 24px;
    }
}
/* 移动端适配 */
@media (max-width: 767px) {
    .credit-card {
        width: 100%;
        max-width: 100%;
        margin-bottom: 10px;
    }
    .card-carousel-item {
        width: 100%;
        margin-bottom: 15px;
        margin-left: 0;
        margin-right: 0;
    }
    .card-carousel-item.card-position-left,
    .card-carousel-item.card-position-right {
        margin: 0;
    }
    .credit-card-inner {
        border-radius: 12px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        height: auto;
        padding: 10px 2px;
    }
    .card-number {
        margin: 10px 0 5px 0;
        font-size: 1.5rem;
        word-break: break-all;
        letter-spacing: 3px;
    }
    .text-muted.small {
        font-size: 1.125rem;
    }
    .fw-bold {
        font-size: 1.125rem;
    }
    .badge {
        font-size: 0.6rem;
        padding: 0.25rem 0.5rem;
    }
    .credit-card-inner .card-body {
        padding: 0.75rem !important;
    }
    .mt-4.mb-4 {
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    .d-flex.justify-content-between img {
        height: 30px;
    }
    .add-card-label {
        font-size: 0.85rem;
    }
    .select-card-issuer {
        font-size: 0.85rem;
    }
    .add-new-card {
        font-size: 0.85rem;
        padding: 0.375rem 0.5rem;
    }
}
/* 模态框手动显示样式 */
.modal.show {
    display: block !important;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

.modal-backdrop.fade {
    opacity: 0;
}

.modal-backdrop.show {
    opacity: 0.5;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: 0;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

.modal.show .modal-dialog {
    transform: none;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.3rem;
    outline: 0;
}

@media (min-width: 576px) {
    .modal-dialog {
        max-width: 500px;
        margin: 1rem auto;
    }
}

@media (min-width: 992px) {
    .modal-lg {
        max-width: 800px;
    }
}

/* 确保弹窗完全居中 */
.modal {
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* 禁用页码按钮的hover和点击效果 */
.pagination .page-item.active .page-link {
    cursor: default;
    pointer-events: none;
}

/* 移除分页按钮的focus样式 */
.pagination .page-link:focus {
    box-shadow: none;
    outline: none;
    z-index: 1;
}

/* 为翻页按钮添加hover效果 */
#pre-paged:hover, #next-paged:hover {
    background-color: #f8f9fa;
}

/* 当前页码样式增强 */
#current-paged {
    border-radius: 4px;
    min-width: 30px;
    text-align: center;
    user-select: none;
}

/* 卡片展开/收起按钮样式 */
.cards-toggle-btn {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    padding: 10px 0;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    border: none;
    color: white;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 右滑图标样式 */
.credit-card-inner .fa-chevron-right {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.credit-card-inner a:hover .fa-chevron-right {
    transform: translateX(3px);
}

.credit-card-inner a {
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.credit-card-inner a:hover {
    opacity: 1 !important;
}

.cards-toggle-btn:hover {
    background: linear-gradient(135deg, #0a58ca, #084298);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    color: rgba(255, 255, 255, 0.9);
}

.cards-toggle-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
    color: white;
}

.cards-toggle-btn i {
    transition: transform 0.3s ease;
    margin-right: 8px;
}

.cards-toggle-btn:hover i.fa-chevron-down {
    transform: translateY(3px);
}

.cards-toggle-btn:hover i.fa-chevron-up {
    transform: translateY(-3px);
}

.card-detail-link {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.card-detail-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-detail-icon:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 账单行点击样式 */
#transactions-table-body tr[id] {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#transactions-table-body tr[id]:hover {
    background-color: #f8f9fa !important;
}

#transactions-table-body tr[id]:active {
    background-color: #e9ecef !important;
}

/* 初始额度下拉选择框样式 */
.credit-limit-dropdown {
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    z-index: 999999 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    position: absolute !important;
}

.credit-limit-option {
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    border-bottom: 1px solid #f8f9fa;
}

.credit-limit-option:last-child {
    border-bottom: none;
}

.credit-limit-option:hover {
    background-color: #2563eb !important;
    color: white !important;
}

.credit-limit-option:active {
    background-color: #e9ecef !important;
}

/* 确保卡片容器不会裁剪下拉框 */
.credit-card-inner {
    overflow: visible !important;
}

.card-carousel-item {
    overflow: visible !important;
}

.card-body {
    overflow: visible !important;
}

/* card-detail页面特有样式 */
.bg-light-danger {
    background-color: #fff5f8 !important;
}

.bg-light-success {
    background-color: #e8fff3 !important;
}

.card-dark {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.copy-btn {
    transition: all 0.2s;
}

.copy-btn.copied {
    background-color: #198754;
    color: white;
    border-color: #198754;
}

.form-control:read-only {
    background-color: #f8f9fa;
}

.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 1rem;
}

.nav-tabs .nav-link.active {
    color: #0d6efd;
    border-bottom: 2px solid #0d6efd;
    background-color: transparent;
}

.nav-tabs .nav-link:hover:not(.active) {
    border-bottom: 2px solid #dee2e6;
}

.table-light th {
    font-weight: 500;
    color: #6c757d;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .woocommerce {
        padding: 16px;
    }

    .woocommerce-checkout {
        padding: 24px;
    }

    .form-row-first,
    .form-row-last {
        width: 100%;
    }
}
