html {
    font-size: 62.5%; /* 10/16 = 0.625 * 100 */
}

.checkout-container {
    max-width: 120rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 11rem auto 10%;
    padding: 0 2rem;
}

em {
    font-style: normal;
    font-weight: 700;
}

hr {
    color: #fff;
    margin-bottom: 1.2rem;
}

/* Left Side Of Container */
.left-side {
    background: url('../../../src/images/checkoutback.jpg');
    background-position: center;
    background-size: cover;
    position: relative;
    min-height: 40rem;
    border-radius: 8px;
    overflow: hidden;
}

.text-box {
    background: rgba(83, 145, 107, 0.76);
    width: 100%;
    padding: 2rem;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 100%;
    overflow-y: auto;
}

/* Left container text */
.home-heading {
    color: #e8e8e1;
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.home-price {
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 1.2rem;
    display: inline-block;
}

.home-desc {
    color: #e8e8e1;
    font-size: 1.4rem;
    line-height: 1.5;
    letter-spacing: 0.5px;
    word-wrap: break-word;
}

/* Cart items */
.cart-item {
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

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

/* Right Side of container */
.right-side {
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.receipt {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-bottom: solid 1px #e0e0e0;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
}

.receipt-heading {
    font-size: 2rem;
    text-align: left;
    margin-bottom: 1rem;
}

.table {
    border-collapse: separate;
    border-spacing: 0 1.5rem;
    color: #64645f;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

.total td {
    font-size: 1.6rem;
    font-weight: 700;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.price {
    text-align: end;
}

/* Payment Section */
.payment-info {
    margin-top: 2rem;
}

.payment-heading {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.form-box {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.card-logo {
    font-size: 2rem;
}

.expires,
.form-box label {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.form-box input,
.form-box select,
.form-box textarea {
    font-family: inherit;
    font-size: 1.4rem;
    padding: 1rem;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-box select {
    height: 4.2rem;
    background-color: white;
}

/* Checkbox styling */
.checkbox-container {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.checkbox-container input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.checkbox-container label {
    cursor: pointer;
    font-size: 1.4rem;
}

#order-comments {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 100px;
    margin-bottom: 1rem;
    font-family: inherit;
    resize: vertical;
}

#order-comments:focus {
    outline: none;
    border-color: #9FAF4C;
    box-shadow: 0 0 0 2px rgba(159, 175, 76, 0.1);
}

.btn {
    background-color: #4c616b;
    border: none;
    border-radius: 8px;
    color: #eff2f3;
    height: auto;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 1rem;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #5f7986;
}

.form-box *:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(159, 175, 76, 0.2);
    border-color: #9FAF4C;
}

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

.popup-content {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    text-align: center;
    max-width: 90%;
    width: 40rem;
    animation: popupSlide 0.3s ease-out;
}

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

.popup-icon {
    font-size: 5rem;
    color: #4CAF50;
    margin-bottom: 2rem;
}

.popup-content h2 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 2.4rem;
}

.popup-content p {
    margin-bottom: 2.5rem;
    color: #666;
    font-size: 1.6rem;
}

#viewOrdersBtn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 1.2rem 2.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 1.6rem;
    font-weight: 600;
}

#viewOrdersBtn:hover {
    background: #45a049;
}

/* Responsive Media Queries */
@media (max-width: 1200px) {
    .checkout-container {
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .checkout-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        margin-top: 8rem;
    }

    .left-side {
        height: auto;
        min-height: 35rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 56.25%; /* 9/16 = 0.5625 * 100 */
    }

    .checkout-container {
        margin-top: 6rem;
        padding: 0 1.5rem;
    }

    .right-side {
        padding: 2rem;
    }

    .popup-content {
        padding: 2.5rem;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 50%; /* 8/16 = 0.5 * 100 */
    }

    .checkout-container {
        margin-top: 5rem;
        padding: 0 1rem;
    }

    .left-side {
        min-height: 30rem;
    }

    .right-side {
        padding: 1.5rem;
    }

    .home-heading {
        font-size: 2.8rem;
    }

    .home-price {
        font-size: 1.8rem;
    }

    .table {
        font-size: 1.3rem;
    }

    .total td {
        font-size: 1.5rem;
    }

    .popup-content {
        padding: 2rem;
        width: 90%;
    }

    .popup-icon {
        font-size: 4rem;
    }

    .popup-content h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 400px) {
    .checkout-container {
        margin-top: 4rem;
    }

    .left-side {
        min-height: 25rem;
    }

    .text-box {
        padding: 1.5rem;
    }

    .payment-heading,
    .receipt-heading {
        font-size: 1.8rem;
    }
}