/**
 * Checkout Page Styles
 * STIFF BEAST Theme
 */

/* Page wrapper */
.checkout-page-wrapper {
    padding-top: 40px;
    padding-bottom: 40px;
}

/* Section headings */
.checkout-page-wrapper h1 {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 30px;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #D40000 0%, #FFD700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.checkout-page-wrapper h2 {
    font-size: 24px;
    font-weight: 700;
    color: #FFD700;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 10px;
}

/* Form styles */
.checkout-page-wrapper .form-label {
    color: #aaaaaa;
    font-weight: 600;
}

.checkout-page-wrapper .form-control,
.checkout-page-wrapper .form-select {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #FFFFFF;
    border-radius: 0 !important;
}

/* Select 下拉框样式 */
.checkout-page-wrapper select.form-control,
.checkout-page-wrapper .form-select {
    height: auto !important;
    min-height: 38px;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23FFD700' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    cursor: pointer;
}

/* Select 下拉选项样式 - 确保深色背景白色文字 */
.checkout-page-wrapper .form-select option,
.checkout-page-wrapper select.form-control option,
.checkout-page-wrapper select option {
    background-color: #1a1a1a !important;
    color: #FFFFFF !important;
    padding: 8px;
}

/* 针对 country 下拉选的特殊样式 */
#country option,
select#country option {
    background-color: #1a1a1a !important;
    color: #FFFFFF !important;
}

/* 选中状态的选项 */
.checkout-page-wrapper select option:checked,
.checkout-page-wrapper select option:hover {
    background-color: #2a2a2a !important;
    color: #FFD700 !important;
}

.checkout-page-wrapper .form-control::placeholder {
    color: #aaaaaa;
}

.checkout-page-wrapper .form-check-label {
    color: #aaaaaa;
}

/* Alert styles */
.checkout-page-wrapper .alert-info {
    background-color: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    color: #FFD700;
    border-radius: 0 !important;
}

/* Card styles */
.checkout-page-wrapper .card {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.9) 0%, rgba(30, 30, 30, 0.95) 100%);
    border: 2px solid rgba(255, 215, 0, 0.3);
    color: #FFFFFF;
    border-radius: 0 !important;
}

.checkout-page-wrapper .card-title {
    color: #FFD700;
}

/* Button styles */
.checkout-page-wrapper .btn-primary {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border: none;
    color: #000000;
    font-weight: 700;
    border-radius: 0 !important;
}

.checkout-page-wrapper .btn-primary:hover {
    opacity: 0.9;
}

/* Order summary text */
.checkout-page-wrapper .d-flex span {
    color: #aaaaaa;
}

.checkout-page-wrapper .d-flex h4 {
    color: #FFD700;
}

.checkout-page-wrapper .text-success {
    color: #00FF00 !important;
}

/* Mobile Order Summary Dropdown Styles */
.order-summary-mobile-dropdown {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    z-index: 999;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.98) 0%, rgba(30, 30, 30, 0.99) 100%);
    border: none;
    border-radius: 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    margin-top: 20px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out, opacity 0.3s ease-out, visibility 0s linear 0.4s;
}

.order-summary-mobile-dropdown.active {
    max-height: 500px;
    padding-top: 15px;
    padding-bottom: 15px;
    opacity: 1;
    visibility: visible;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out, opacity 0.3s ease-out, visibility 0s linear 0s;
}

.order-summary-mobile-dropdown .card-body {
    padding: 15px;
}

@media (min-width: 768px) {
    .order-summary-mobile-dropdown,
    #toggle-order-summary {
        display: none !important;
    }
}

/* Ensure order summary shows on desktop */
@media (min-width: 768px) {
    .col-md-4.d-none.d-md-block {
        display: block !important;
    }
    
    .order-summary-column {
        display: block !important;
    }
}

/* Hide order summary column on mobile */
@media (max-width: 767.98px) {
    .order-summary-column {
        display: none !important;
    }
}

/* Order summary toggle wrapper */
.order-summary-toggle-wrapper {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Order summary toggle button */
.order-summary-toggle {
    background-color: rgba(255, 255, 255, 0.05);
    border: none;
    color: #FFD700;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-summary-toggle:hover {
    background-color: rgba(255, 215, 0, 0.1);
    border-color: #FFD700;
}

.order-summary-toggle-text {
    display: flex;
    align-items: center;
}

.order-summary-toggle-icon {
    transition: transform 0.3s ease;
    margin-left: 8px;
}

.order-summary-toggle.active .order-summary-toggle-icon {
    transform: rotate(180deg);
}

.order-summary-toggle-total {
    color: #FFD700;
    font-weight: 700;
    font-size: 1.2rem;
}

/* Shipping Method Selection Styles */
.shipping-method-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 215, 0, 0.3);
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.shipping-method-option:hover {
    border-color: rgba(255, 215, 0, 0.6);
    background: rgba(255, 215, 0, 0.05);
}

.shipping-method-option.selected {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.15);
}

.shipping-method-option input[type="radio"] {
    margin-top: 3px;
    accent-color: #FFD700;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.shipping-method-details {
    flex: 1;
}

.shipping-method-name {
    color: #FFD700;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
}

.shipping-method-description {
    color: #aaa;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.shipping-method-delivery {
    color: #888;
    font-size: 0.8rem;
}

.shipping-method-price {
    color: #FFD700;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: right;
    min-width: 80px;
}

.shipping-method-price.free {
    color: #00FF00;
}

.shipping-free-hint {
    color: #888;
    font-size: 0.75rem;
    margin-top: 2px;
}

/* Payment method buttons container */
.payment-method-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Payment method buttons */
.payment-method-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 215, 0, 0.3);
    color: #aaa;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 0 !important;
}

.payment-method-btn.active {
    background-color: rgba(255, 215, 0, 0.2);
    border: 2px solid #FFD700;
    color: #FFD700;
}

.payment-method-btn:hover {
    border-color: rgba(255, 215, 0, 0.6);
}

/* QR Code placeholder */
.qr-placeholder {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 0.9rem;
}

/* Payment QR Code Image */
/* [MODIFIED] 增加选择器特异性，覆盖 WooCommerce 的 .woocommerce img 样式 */
.payment-qr-code,
.woocommerce .payment-qr-code,
.woocommerce-page .payment-qr-code,
img.payment-qr-code {
    max-width: 250px !important;
    width: 250px;
    height: auto !important;
    border: 2px dashed rgba(255, 215, 0, 0.3);
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Bank info styles */
.bank-info {
    background-color: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    padding: 15px;
}

.bank-info p {
    margin-bottom: 8px;
    color: #ccc;
}

.bank-info p:last-child {
    margin-bottom: 0;
}

.bank-info strong {
    color: #FFD700;
}

/* Logistics support badges container */
.logistics-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Logistics support badges */
.logistics-badge {
    background: rgba(255,255,255,0.05);
    padding: 8px 12px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 6px;
}

.logistics-badge span {
    color: #FFD700;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Upload area styles */
.upload-area {
    width: 100%;
    max-width: 400px;
    height: 250px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-style: dashed;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

/* Payment upload area - centered */
#alipayForm .upload-area,
#wechatPayForm .upload-area {
    margin: 0 auto;
}

/* Upload receipt label - yellow color for payment forms */
#alipayForm .form-label,
#wechatPayForm .form-label {
    color: #FFD700;
}

.upload-area:hover {
    border-color: #FFD700;
    background-color: rgba(255, 215, 0, 0.05);
}

.upload-placeholder {
    text-align: center;
    color: #6c757d;
}

.upload-placeholder svg {
    color: #FFD700;
}

/* Remove upload button */
.remove-upload-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background-color: rgba(212, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.remove-upload-btn:hover {
    background-color: #D40000;
    transform: scale(1.1);
}

/* Order summary card */
.order-summary-card {
    position: sticky;
    top: 100px;
}

.order-summary-card .card-body {
    padding: 20px;
}

.order-summary-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.order-summary-item:last-child {
    border-bottom: none;
}

.order-summary-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.order-summary-item-details {
    flex: 1;
}

.order-summary-item-name {
    color: #FFD700;
    font-weight: 600;
    font-size: 0.9rem;
}

.order-summary-item-qty {
    color: #888;
    font-size: 0.8rem;
}

.order-summary-item-price {
    color: #FFFFFF;
    font-weight: 600;
}

/* Complete order button */
.complete-order-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border: none;
    color: #000000;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0 !important;
}

.complete-order-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.complete-order-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Terms notice */
.terms-notice {
    font-size: 0.8rem;
    color: #aaaaaa;
    line-height: 1.5;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.terms-notice a {
    color: #FFD700;
    text-decoration: underline;
}

.terms-notice a:hover {
    color: #FFA500;
}
