/* Buy Now Modal Purchase Section Style Fix */

/* Fix for the Complete Your Purchase section */
.modal-content .purchase-section,
.modal-content .buy-now-confirmation,
.modal-body .purchase-confirmation-section {
    padding: 1.5rem;
}

/* Fix the Buy Now Price Button/Display */
.buy-now-price-display,
.buy-now-price-section,
.price-display-section,
.modal-body .price-display {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    padding: 1.25rem !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    margin-bottom: 1.5rem !important;
    text-align: center !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Remove the flashy gradient animation */
.buy-now-price-display::before,
.buy-now-price-section::before,
.price-display-section::before {
    display: none !important;
}

/* Style the price label */
.buy-now-price-display .price-label,
.price-display .price-label,
.price-display-section .label {
    font-size: 0.875rem !important;
    color: rgba(255, 255, 255, 0.7) !important;
    margin-bottom: 0.5rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    font-weight: 600 !important;
}

/* Style the price value */
.buy-now-price-display .price-value,
.price-display .price-value,
.price-display-section .value {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif !important;
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-shadow: none !important;
    margin: 0 !important;
}

/* Fix the Confirm Purchase button */
.btn-confirm-purchase,
.modal-footer .btn-primary,
button[onclick*="confirmBuyNow"],
.confirm-purchase-btn,
#confirmPurchaseBtn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    border: none !important;
    color: white !important;
    padding: 0.875rem 2rem !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.025em !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    width: auto !important;
    margin: 0 auto !important;
}

/* Hover state for confirm button */
.btn-confirm-purchase:hover,
.modal-footer .btn-primary:hover,
button[onclick*="confirmBuyNow"]:hover,
.confirm-purchase-btn:hover,
#confirmPurchaseBtn:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4) !important;
}

/* Disabled state */
.btn-confirm-purchase:disabled,
button[onclick*="confirmBuyNow"]:disabled,
#confirmPurchaseBtn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Modal footer button group */
.modal-footer .button-group,
.purchase-actions,
.confirmation-actions {
    display: flex !important;
    gap: 1rem !important;
    justify-content: center !important;
    margin-top: 1.5rem !important;
}

/* Cancel button styling */
.btn-cancel,
.modal-footer .btn-secondary,
button[onclick*="showBidForm"] {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.875rem 2rem !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.btn-cancel:hover,
.modal-footer .btn-secondary:hover,
button[onclick*="showBidForm"]:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: white !important;
}

/* Purchase info styling */
.purchase-info,
.confirmation-details {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
}

.purchase-info p,
.purchase-info li,
.confirmation-details p,
.confirmation-details li {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.875rem !important;
    line-height: 1.6 !important;
}

/* Agreement checkbox styling */
.agreement-section {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
    margin: 1rem 0 !important;
}

.agreement-section input[type="checkbox"] {
    margin-top: 0.25rem !important;
}

.agreement-section label {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.875rem !important;
    line-height: 1.4 !important;
}

/* Light mode support */
[data-theme="light"] .buy-now-price-display,
[data-theme="light"] .buy-now-price-section,
[data-theme="light"] .price-display-section {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .buy-now-price-display .price-label,
[data-theme="light"] .price-display .price-label {
    color: rgba(0, 0, 0, 0.6) !important;
}

[data-theme="light"] .buy-now-price-display .price-value,
[data-theme="light"] .price-display .price-value {
    color: #111827 !important;
}

[data-theme="light"] .purchase-info,
[data-theme="light"] .confirmation-details {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .purchase-info p,
[data-theme="light"] .purchase-info li,
[data-theme="light"] .confirmation-details p,
[data-theme="light"] .confirmation-details li {
    color: rgba(0, 0, 0, 0.7) !important;
}

[data-theme="light"] .agreement-section label {
    color: rgba(0, 0, 0, 0.7) !important;
}

/* Modal section headers */
.modal-section-header,
.purchase-header {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin-bottom: 1rem !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: white !important;
}

[data-theme="light"] .modal-section-header,
[data-theme="light"] .purchase-header {
    color: #111827 !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .buy-now-price-display .price-value,
    .price-display .price-value {
        font-size: 1.5rem !important;
    }
    
    .modal-footer .button-group,
    .purchase-actions {
        flex-direction: column !important;
    }
    
    .btn-confirm-purchase,
    .btn-cancel,
    .modal-footer .btn-primary,
    .modal-footer .btn-secondary {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* Remove any unwanted animations or transitions that make it look bad */
.buy-now-price-display *,
.price-display-section *,
.btn-confirm-purchase {
    animation: none !important;
}

/* Ensure proper spacing in modal */
.modal-body > * {
    margin-bottom: 1rem;
}

.modal-body > *:last-child {
    margin-bottom: 0;
}

/* Fix any overflow issues */
.modal-content {
    overflow: visible !important;
}

.modal-body {
    overflow-y: auto !important;
    max-height: calc(90vh - 200px) !important;
}
