/* =================================================================
   CHECKOUT PAGE STYLES - HORIZONTAL LAYOUT
   ================================================================= */

.checkout-page {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #6fb881 0%, #8fc89b 50%, #a8d8b5 100%);
    position: relative;
}

.checkout-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.5;
    pointer-events: none;
}

/* Top timestamp bar */
.checkout-page .top-bar {
    position: absolute;
    top: 15px;
    left: 20px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    padding: 8px 18px;
    border-radius: 8px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkout-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 20px 80px;
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 160px);
}

.checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.checkout-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.checkout-header h2 i {
    color: white;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: #495057;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-link:hover {
    background: white;
    border-color: white;
    color: #3ebc5e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Two Column Grid Layout */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 30px;
    align-items: start;
}

.checkout-form-column {
    background: white;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.order-summary-column {
    position: sticky;
    top: 30px;
    margin-bottom: 40px;
}

.payment-device {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 60px 30px;
    text-align: center;
    margin-bottom: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.payment-device:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.device-visual {
    background: linear-gradient(135deg, #333 0%, #555 100%);
    width: 120px;
    height: 80px;
    margin: 0 auto 30px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.device-visual::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

.device-visual::after {
    content: '\F282';
    font-family: 'bootstrap-icons';
    font-size: 48px;
    color: white;
    position: relative;
    z-index: 1;
}

.device-icon {
    background: #333;
    width: 120px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.device-icon i {
    color: white;
    font-size: 48px;
}

.tap-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.tap-instruction {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.tap-subtitle {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 30px;
}

.payment-methods {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.payment-icons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.payment-icon {
    width: 60px;
    height: 40px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 8px;
}

.payment-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Order Summary Card - Professional Sticky Design */
.order-summary-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.summary-header {
    background: linear-gradient(135deg, #3ebc5e 0%, #2fa84f 100%);
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.summary-header i {
    font-size: 24px;
    color: white;
}

.summary-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.order-items-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 25px;
    border-bottom: 1px solid #e9ecef;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px dashed #e9ecef;
}

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

.item-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.item-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.item-quantity {
    font-size: 12px;
    color: #6c757d;
}

.item-amount {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.summary-calculations {
    padding: 20px 25px;
    background: #f8f9fa;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    color: #495057;
}

.calc-row.total-row {
    padding-top: 15px;
    margin-top: 10px;
    border-top: 2px solid #dee2e6;
}

.calc-row.total-row span {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.total-amount {
    color: #3ebc5e !important;
    font-size: 24px !important;
}

/* Security Badges */
.security-badges {
    padding: 20px 25px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-around;
    gap: 15px;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 13px;
    font-weight: 600;
}

.badge-item i {
    font-size: 24px;
    color: #3ebc5e;
}

.processing-animation {
    display: none;
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3ebc5e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.status-message {
    margin-top: 30px;
    padding: 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 12px;
    color: #155724;
    display: none;
    text-align: center;
}

.status-message i {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 15px;
    display: block;
}

.status-message strong {
    display: block;
    font-size: 20px;
    margin-bottom: 10px;
}

.status-message p {
    margin: 0;
    color: #155724;
}

.order-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 13px;
}

.item-info {
    flex: 1;
}

.item-qty {
    color: #6c757d;
    margin-left: 10px;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .checkout-grid {
        grid-template-columns: 1fr 380px;
        gap: 20px;
    }

    .checkout-form-column {
        padding: 25px;
    }
}

@media (max-width: 992px) {
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .order-summary-column {
        position: relative;
        top: 0;
        order: -1;
    }

    .checkout-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .checkout-header h2 {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .checkout-container {
        padding: 80px 15px 60px;
    }

    .checkout-form-column {
        padding: 20px;
        margin-bottom: 30px;
    }

    .order-summary-column {
        margin-bottom: 30px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .payment-method-selector {
        grid-template-columns: 1fr;
    }

    .checkout-header h2 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .checkout-container {
        padding: 80px 10px 50px;
    }

    .checkout-form-column {
        padding: 20px 15px;
        border-radius: 12px;
        margin-bottom: 25px;
    }

    .order-summary-column {
        margin-bottom: 25px;
    }

    .checkout-header {
        padding: 15px 20px;
    }

    .checkout-header h2 {
        font-size: 20px;
    }

    .section-title {
        font-size: 16px;
    }

    .form-group .form-control {
        padding: 10px 12px;
    }

    .back-link {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* =================================================================
   CHECKOUT FORM STYLES
   ================================================================= */

.form-section {
    margin-bottom: 35px;
}

.form-section:last-of-type {
    margin-bottom: 25px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
}



.form-group .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.form-group .form-control:focus {
    outline: none;
    border-color: #3ebc5e;
    box-shadow: 0 0 0 4px rgba(62, 188, 94, 0.1);
}

.form-group.has-error .form-control {
    border-color: #dc3545;
    background: #fff5f5;
}

.error-message {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 6px;
    font-weight: 500;
}

/* Payment Method Selector */
.payment-method-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.payment-option {
    position: relative;
    cursor: pointer;
}

.payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.payment-option .option-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-weight: 600;
    color: #495057;
    transition: all 0.3s ease;
}

.payment-option .option-label i {
    font-size: 20px;
}

.payment-option input[type="radio"]:checked + .option-label {
    background: #3ebc5e;
    color: white;
    border-color: #3ebc5e;
    box-shadow: 0 4px 12px rgba(62, 188, 94, 0.3);
}

/* Payment Forms */
.payment-form {
    display: none;
    animation: fadeIn 0.3s ease;
}

.payment-form.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, #2fa84f 0%, #3ebc5e 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    box-shadow: 0 4px 12px rgba(62, 188, 94, 0.25);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(62, 188, 94, 0.4);
    background: linear-gradient(135deg, #2fa84f 0%, #3ebc5e 100%);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-submit i {
    font-size: 18px;
}

/* Success/Error Messages */
.status-message {
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    margin-top: 20px;
}

.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.success-message i {
    color: #28a745;
    font-size: 48px;
    margin-bottom: 15px;
}

.success-message strong {
    display: block;
    font-size: 20px;
    margin-bottom: 10px;
}

.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.error-message i {
    color: #dc3545;
    font-size: 48px;
    margin-bottom: 15px;
}

.error-message strong {
    display: block;
    font-size: 20px;
    margin-bottom: 10px;
}

/* Processing Animation */
.processing-animation {
    text-align: center;
    padding: 40px;
}

.processing-animation p {
    color: #6c757d;
    font-size: 16px;
    font-weight: 500;
}
