* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.payment-container {
    background: linear-gradient(135deg, #334155, #1e293b);
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    padding: 35px;
    width: 100%; /* Full width */
    max-width: 1200px; /* Adjust for larger screens */
    min-height: 80vh; /* Ensure container fills more of the screen height */
    backdrop-filter: blur(10px);
    margin: auto; /* Center it properly */
}

h2 {
    font-size: 1.7em;
    margin-bottom: 30px;
    text-align: center;
    color: #4ac5ff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

h3 {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #cbd5e1;
}

.payment-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap; /* Ensures responsiveness */
    width: 100%; /* Full width */
}

.payment-selection,
.order-details {
    flex: 1;
    padding: 20px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s, transform 0.3s;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.order-details, .payment-selection {
    width: 100%; /* Ensure full width on mobile */
}

.form-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    gap: 10px;
}

input[type="radio"] {
    appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    border: 2px solid #4ac5ff;
    background: #1e293b;
    transition: background-color 0.3s, border-color 0.3s;
    margin-right: 10px;
    cursor: pointer;
}

input[type="radio"]:checked {
    background-color: #4ac5ff;
}

.delivery-label,
.payment-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-grow: 1;
    position: relative;
    padding: 10px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s;
}

.payment-icon {
    flex-shrink: 0;
    display: flex;
    gap: 10px;
}

.card-details {
    display: none;
    margin-top: 20px;
}

.payment-option input:checked ~ .card-details {
    display: block;
}

.form-control {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #4b5563;
    background-color: #2e3a47;
    color: #fff;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: #4ac5ff;
    outline: none;
}

.inline {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.inline .form-group {
    flex: 0 0 48%;
}

.btn {
    background-color: #4ac5ff;
    border: none;
    border-radius: 8px;
    color: #1e293b;
    font-size: 1.1em;
    padding: 15px;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.btn:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
}

.btn-success {
    margin-top: 30px;
}

.order-details {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    color: #cbd5e1;
}

.invoice-header p {
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #94a3b8;
}

.invoice-contact p {
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #cbd5e1;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
}

.invoice-table-container {
    width: 100%;
    overflow-x: auto; /* Allows horizontal scrolling on small screens */
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    min-width: 600px; /* Ensures a minimum width for the table */
}

.invoice-table th,
.invoice-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px;
    text-align: left;
    font-size: 0.9em;
    color: #e2e8f0;
}

.invoice-table th {
    color: #4ac5ff;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85em;
}

.invoice-table td {
    font-size: 0.95em;
}

.invoice-footer p {
    margin-top: 15px;
    font-size: 1.1em;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
}

.invoice-footer p strong {
    color: #4ac5ff;
}

.footer {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    margin-top: 20px; /* Space above footer */
}

.footer h3 {
    margin-bottom: 10px;
    color: #cbd5e1;
}

.footer p {
    color: #94a3b8;
    font-size: 0.9em;
}

.footer-links {
    display: flex;
    flex-wrap: wrap; /* Ensure links wrap in smaller screens */
    gap: 15px; /* Space between links */
    margin-bottom: 10px; /* Space below links */
}

.footer-links a {
    color: #4ac5ff;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #2563eb;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .invoice-table th,
    .invoice-table td {
        font-size: 0.85em; /* Slightly smaller text for better fit */
        padding: 8px;
    }

    .invoice-table-container {
        margin-bottom: 20px; /* Adds space below the table for better readability */
    }
}


/* Responsive for mobile view */
@media (max-width: 768px) {
    .payment-wrapper {
        flex-direction: column;
    }

    .payment-selection,
    .order-details {
        width: 100%; /* Full width for each section */
        margin-bottom: 20px;
    }

    .btn-success {
        margin-top: 20px;
    }

    /* Adjust padding for small screens */
    .payment-container {
        padding: 20px;
    }
}