.checkout-container {
    display: flex;
    max-width: 1100px;
    margin: 40px auto;
    gap: 30px;
    padding: 20px;
}

.payment-form {
    flex: 2;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.order-summary {
    flex: 1;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.payment-methods {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.method {
    border: 2px solid #eee;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    flex: 1;
    text-align: center;
}

.method.active {
    border-color: #0e4e64;
    background: #fff5f2;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.total-price {
    font-size: 24px;
    color: #126c8a;
    font-weight: bold;
}

.pay-now-btn {
    width: 100%;
    background: #27ae60;
    color: white;
    padding: 15px;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    margin-top: 20px;
}

.payment-form button {
    padding: 10px 10px;
    background-color: #093d4f;
    border: none;
    border-radius: 8px;
}

.payment-form button a {
    padding: 20px 10px;
    color: white;
}

/* Success Modal Styles */
.modal-overlay {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.success-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    animation: popIn 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes popIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-icon {
    background: #27ae60;
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 25px;
}

.success-card h2 {
    font-size: 28px;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.success-card p {
    color: #555;
    line-height: 1.5;
    margin-bottom: 30px;
}

.modal-btn {
    background: #2c3e50;
    color: white;
    border: none;
    padding: 15px 0;
    width: 100%;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.modal-btn:hover {
    background: #1a252f;
}
.modal-overlay {
    display: none; /* Keep it hidden until clicked */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Darkens the background */
    backdrop-filter: blur(5px); /* Professional blur effect */
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

/* This is the white card itself */
.success-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.loading-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 2000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #2c3e50; /* Matches your theme color */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

.loading-overlay p {
    font-family: sans-serif;
    color: #2c3e50;
    font-weight: bold;
}

.payment-methods {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.method {
    flex: 1;
    padding: 15px;
    border: 2px solid #eee; /* Default border color */
    border-radius: 10px;
    text-align: center;
    cursor: pointer; /* This makes the mouse turn into a hand */
    transition: all 0.3s ease;
    background: #fff;
}

/* Hover effect to show it is interactive */
.method:hover {
    border-color: #ddd;
    background-color: #f9f9f9;
}

/* Active state (when clicked) as seen in your image */
.method.active {
    border-color: #6a868f; /* The orange/red border from your screenshot */
    background-color: #6a868f; /* Light orange tint */
    color: #0f3845;
}

.error-msg {
    color: #ff4500;
    font-size: 12px;
    margin-top: 5px;
    display: none; /* Hidden by default */
}

input.invalid {
    border: 2px solid #ff4500 !important;
    background-color: #fff5f2;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    50% { transform: translateX(8px); }
    75% { transform: translateX(-8px); }
}

.shake {
    animation: shake 0.3s ease-in-out;
}

#card-details-section {
    display: block;
    margin-top: 15px;
}

.back-btn {
    margin-bottom: 20px;
    padding: 8px 15px;
    cursor: pointer;
}

.back-btn a {
    text-decoration: none;
    color: white;
}

.modal-overlay {
    display: none; 
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

#card-details-section {
    display: block; 
}