/**
 * Single Page Checkout Styles
 */

/* Shortcode Container */
.spc-shortcode-container {
    margin: 20px 0;
    text-align: center;
}

.spc-product-title {
    margin-bottom: 10px;
    font-size: 18px;
    color: #333;
}

.spc-product-price {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #0071a1;
}

/* Buy Now Button */
.single_page_checkout_button {
    margin-top: 10px;
    background-color: #8C32D7;
    color: #fff;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 19999px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.single_page_checkout_button:hover {
    background-color: #8C32D7 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Modal Overlay */
.spc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.spc-modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Container */
.spc-checkout-modal {
    background: #fff;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

/* Modal Header */
.spc-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
}

.spc-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.spc-close-modal {
    background: none;
    border: none;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 1;
    transition: color 0.3s ease;
}

.spc-close-modal:hover {
    color: #000;
}

/* Modal Body */
.spc-modal-body {
    padding: 30px;
}

/* Order Summary */
.spc-order-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 35px;
    border-left: 5px solid #28a745;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.1);
}

.spc-order-summary h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: #2c3e50;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spc-cart-items {
    margin-bottom: 15px;
}

.spc-cart-item {
    display: flex;
    align-items: center;
    padding: 18px 0;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 10px;
}

.spc-cart-item:last-child {
    border-bottom: none;
}

.spc-item-image {
    flex: 0 0 60px;
    margin-right: 15px;
}

.spc-item-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.spc-item-details {
    flex: 1;
}

.spc-item-details h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

.spc-quantity {
    font-size: 14px;
    color: #666;
}

.spc-item-price {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

/* Totals */
.spc-totals {
    border-top: 2px solid #e0e0e0;
    padding-top: 15px;
}

.spc-subtotal,
.spc-shipping,
.spc-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.spc-total {
    font-size: 18px;
    margin-bottom: 0;
}

/* Custom Fields */
.spc-custom-fields {
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 5px solid #0071a1;
    box-shadow: 0 4px 15px rgba(0, 113, 161, 0.1);
}

.spc-custom-fields h3 {
    margin-bottom: 30px;
    font-size: 22px;
    color: #2c3e50;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.spc-custom-fields h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #0071a1, #005a87);
    border-radius: 2px;
}

.spc-custom-field {
    margin-bottom: 25px;
    padding: 15px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.spc-custom-field:hover {
    box-shadow: 0 4px 15px rgba(0, 113, 161, 0.1);
    transform: translateY(-2px);
}

.spc-custom-field label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 15px;
    color: #2c3e50;
    letter-spacing: 0.5px;
}

.spc-custom-field .required {
    color: #e74c3c;
    font-weight: 700;
}

.spc-custom-field .spc-input {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafbfc;
    color: #2c3e50;
}

.spc-custom-field .spc-input:focus {
    outline: none;
    border-color: #0071a1;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 113, 161, 0.1);
    transform: translateY(-1px);
}

.spc-custom-field .spc-input::placeholder {
    color: #95a5a6;
    font-style: italic;
}

/* Radio Groups */
.spc-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.spc-radio-label {
    display: flex;
    align-items: center;
    padding: 15px 18px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafbfc;
    position: relative;
}

.spc-radio-label:hover {
    border-color: #0071a1;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 113, 161, 0.15);
}

.spc-radio-label input[type="radio"] {
    margin-right: 15px;
    width: 18px;
    height: 18px;
    accent-color: #0071a1;
}

.spc-radio-label input[type="radio"]:checked + .spc-radio-text {
    font-weight: 700;
    color: #0071a1;
}

.spc-radio-label:has(input[type="radio"]:checked) {
    border-color: #0071a1;
    background: linear-gradient(135deg, #e6f3ff 0%, #cce7ff 100%);
    box-shadow: 0 4px 15px rgba(0, 113, 161, 0.2);
}

.spc-radio-text {
    flex: 1;
    font-size: 15px;
    color: #2c3e50;
    line-height: 1.4;
}

/* Checkbox Groups */
.spc-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.spc-checkbox-label {
    display: flex;
    align-items: center;
    padding: 15px 18px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafbfc;
    position: relative;
}

.spc-checkbox-label:hover {
    border-color: #0071a1;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 113, 161, 0.15);
}

.spc-checkbox-label input[type="checkbox"] {
    margin-right: 15px;
    width: 18px;
    height: 18px;
    accent-color: #0071a1;
}

.spc-checkbox-label input[type="checkbox"]:checked + .spc-checkbox-text {
    font-weight: 700;
    color: #0071a1;
}

.spc-checkbox-label:has(input[type="checkbox"]:checked) {
    border-color: #0071a1;
    background: linear-gradient(135deg, #e6f3ff 0%, #cce7ff 100%);
    box-shadow: 0 4px 15px rgba(0, 113, 161, 0.2);
}

.spc-checkbox-text {
    flex: 1;
    font-size: 15px;
    color: #2c3e50;
    line-height: 1.4;
}

/* Conditional Fields */
.spc-custom-field[data-conditional="hidden"] {
    display: none;
}

/* Billing Details */
.spc-billing-details {
    margin-bottom: 30px;
}

.spc-billing-details h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #333;
}

/* Form Rows */
.spc-form-row {
    margin-bottom: 20px;
}

.spc-form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.spc-form-row-third {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

@media (max-width: 768px) {
    .spc-form-row-half,
    .spc-form-row-third {
        grid-template-columns: 1fr;
    }
}

/* Form Fields */
.spc-form-field {
    margin-bottom: 0;
}

.spc-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.spc-form-field .required {
    color: #e74c3c;
}

.spc-input,
.spc-select,
.spc-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.spc-input:focus,
.spc-select:focus,
.spc-textarea:focus {
    outline: none;
    border-color: #0071a1;
}

.spc-textarea {
    resize: vertical;
    font-family: inherit;
}

/* Payment Methods */
.spc-payment-methods {
    margin-bottom: 35px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 5px solid #6f42c1;
    box-shadow: 0 4px 15px rgba(111, 66, 193, 0.1);
}

.spc-payment-methods h3 {
    margin-bottom: 20px;
    font-size: 20px;
    color: #2c3e50;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spc-payment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.spc-payment-list li {
    margin-bottom: 18px;
}

.spc-payment-list label {
    display: block;
    padding: 18px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.spc-payment-list label:hover {
    border-color: #6f42c1;
    background: linear-gradient(135deg, #f8f0ff 0%, #e6d9ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(111, 66, 193, 0.15);
}

.spc-payment-list input[type="radio"] {
    margin-right: 10px;
}

.spc-payment-list input[type="radio"]:checked + label {
    border-color: #6f42c1;
    background: linear-gradient(135deg, #e6d9ff 0%, #d4c5ff 100%);
    box-shadow: 0 6px 20px rgba(111, 66, 193, 0.2);
}

.payment_box {
    margin-top: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    font-size: 14px;
}

/* Form Actions */
.spc-form-actions {
    text-align: center;
    margin-top: 30px;
}

.spc-submit-button {
    background: linear-gradient(135deg, #0071a1 0%, #005a87 100%);
    color: #fff;
    padding: 18px 50px;
    font-size: 20px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 300px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 6px 20px rgba(0, 113, 161, 0.3);
}

.spc-submit-button:hover {
    background: linear-gradient(135deg, #005a87 0%, #004066 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 113, 161, 0.4);
}

.spc-submit-button:disabled {
    background: linear-gradient(135deg, #ccc 0%, #999 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading State */
.spc-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.spc-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0071a1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Error Messages */
.spc-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #f5c6cb;
}

/* Success Messages */
.spc-success {
    background-color: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #c3e6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .spc-checkout-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .spc-modal-header,
    .spc-modal-body {
        padding: 20px;
    }
    
    .spc-modal-header h2 {
        font-size: 20px;
    }
    
    .spc-cart-item {
        flex-wrap: wrap;
    }
    
    .spc-item-price {
        flex: 0 0 100%;
        margin-top: 10px;
        text-align: right;
    }
}

/* Scrollbar Styling */
.spc-checkout-modal::-webkit-scrollbar {
    width: 8px;
}

.spc-checkout-modal::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.spc-checkout-modal::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.spc-checkout-modal::-webkit-scrollbar-thumb:hover {
    background: #555;
}

