/* Checkout Page Styles */

.checkout-layout {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.checkout-container {
    display: flex;
    margin: 40px auto;
    padding: 0 20px;
}

h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1E6CAE;
}

p {
    font-size: 16px;
	font-weight: 500;
    margin-bottom: 10px;
	color: #1E6CAE;
}

hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

/* Checkout List */
.checkout-list {
    display: flex;
	width: 80%;
    flex-direction: column;
}

/* Checkout Item */
.checkout-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.checkout-item img {
    width: 80px; /* Optimized for space */
    height: 80px;
    margin-right: 20px;
    border-radius: 8px;
    object-fit: cover; /* Maintain aspect ratio */
    border: 1px solid #ddd; /* Optional subtle border */
}

.checkout-item-details {
    display: flex;	
    flex-direction: column;
	width: 55%;
}

.checkout-item-details a {
    font-size: 16px;
    font-weight: bold;
    color: #1E6CAE;
    text-decoration: none;
    margin-bottom: 6px;
    display: block;
}

.checkout-item-details a:hover {
    text-decoration: underline;
}

.author-details {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 5px;
	font-weight: bold;
}

.course-info {
    font-size: 14px;
    color: #7f8c8d;
	font-weight: bold;
}

.course-info span {
    margin-right: 8px;
}

/* Remove Item Link */
.remove-item {
	display: flex;
	width: 10%;
	margin-top: 2px;
    font-size: 14px;
    color: #007bff;
    cursor: pointer;
}

.remove-item:hover {
    text-decoration: underline;
}

/* Price Details */
.c-price-details {
	display: flex;	
    flex-direction: column;
	width: 24%;
    align-items: flex-start;
}

.price-row {
    margin-bottom: 5px;
}

.original-price {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-right: 10px;
}

.struck-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
}

.c-final-price {
    font-size: 16px;
    font-weight: bold;
    color: #1E6CAE;
}

/* Checkout Amount Section */
.checkout-amount {
	width: 20%;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.total-line {
    display: flex;
    align-items: baseline; /* aligns text nicely */
    gap: 10px; /* spacing between elements */
    flex-wrap: nowrap; /* prevents line break */
}

.total-line h2,
.total-line .struck-total-price {
    margin: 0; /* removes default margin that can cause line break */
}

.checkout-amount h2 {
    font-size: 22px;
    margin-bottom: 5px;
}

.struck-total-price {
    font-size: 20px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 10px;
}

.checkout-button {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #1E6CAE;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
}

.checkout-button:hover {
    background-color: #0F52BA;
}

.dismiss-modal {
    position: fixed; /* Ensures the modal stays in place even on scroll */
    top: 25%; /* Aligns the modal to the top */
    left: 25%; /* Aligns the modal to the left */
    width: auto; /* Auto adjusts based on content */
    height: auto; /* Auto adjusts based on  */
    display: flex; /* Flexbox for centering */
    justify-content: center; /* Horizontally center */
    align-items: center; /* Vertically center */
    z-index: 1000; /* Makes sure it appears on top of other elements */
}

.modal-content {
    position: relative; /* For close button positioning */
    background-color: #fff; /* White background for modal content */
    padding: 20px;
    border-radius: 5px;
    max-width: 400px; /* Maximum width for modal content */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Shadow for a nice effect */
    text-align: center;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.close-btn:hover {
    color: #f37254; /* Change color on hover */
}

#retryPaymentBtn {
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #9d2910;
    color: white;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.payment-incomplete-heading {
    color: #9d2910;
    font-weight: bold;
    font-size: 18px; /* Default */
}

.checkout-agreement {
    font-size: 0.9rem;
    color: #555;
    margin-top: 10px;
}

.checkout-agreement a {
    color: #007bff;
    text-decoration: none;
}

.checkout-agreement a:hover {
    text-decoration: underline;
}

.payment-success-container {
    text-align: center;
    padding: 40px 20px;
    background: #f6f9f3;
    border: 2px solid #c5e1a5;
    border-radius: 10px;
}

.payment-success-heading {
    color: #2e7d32;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
}

.success-continue-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 24px;
    background-color: #1E6CAE;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}


/* === ✅ Large Desktops (min-width: 1920px) === */
@media (min-width: 1920px) {

    .checkout-layout {
        max-width: 1800px;
        margin: 40px auto;
        padding: 0 20px;
    }

    .checkout-list {
        width: 75%;
    }

    .checkout-item img {
        width: 90px; 
        height: 90px;
        margin-right: 16px;
        border-radius: 8px;
    }
    
    .checkout-item-details {
        width: 60%;
    }

    .checkout-item-details a {
        margin-bottom: 8px;
    }

    .course-info span {
        margin-right:14px;
    }
    
    .c-price-details {
        width: 25%;
    }

    .checkout-amount {
        width: 25%;
        padding: 14px;
    }

    h1 {
        font-size: 32px;
    }
    p,
    .checkout-agreement {
        font-size: 16px;
    }

    .checkout-item-details a {
        font-size: 20px;
    }

    .remove-item {
        font-size: 16px;
    }

    .author-details,
    .course-info,
    .price-row,
    .original-price,
    .struck-price,
    .c-final-price,
    .struck-total-price {
        font-size: 20px;
    }
    .checkout-button {
        font-size: 20px;
        padding: 16px;
    }
    .checkout-amount h2 {
        font-size: 26px;
    }

    .payment-success-heading {
        font-size: 28px;
    }

    .success-continue-btn {
        font-size: 18px;
        padding: 12px 28px;
    }

    #retryPaymentBtn {
    font-size: 20px;
    padding: 12px 24px;
    }

    .payment-incomplete-heading {
        font-size: 22px;
    }
}

/* === ✅ Standard Laptops (max-width: 1280px) === */
@media (max-width: 1280px) {

    .checkout-layout {
        max-width: 1200px;
        margin: 30px auto;
        padding: 0 20px;
    }

    .checkout-list {
        width: 75%;
    }

    .checkout-item img {
        width: 75px; 
        height: 75px;
        margin-right: 12px;
        border-radius: 5px;
    }
    
    .checkout-item-details {
        width: 50%;
    }

    .checkout-item-details a {
        margin-bottom: 4px;
    }

    .course-info span {
        margin-right:6px;
    }

    .c-price-details {
        width: 25%;
    }

    .checkout-amount {
        width: 25%;
        padding: 10px;
    }

    h1 {
        font-size: 26px;
    }
    p,
    .checkout-agreement {
        font-size: 15px;
    }
    .checkout-item-details a {
        font-size: 16px;
    }

    .remove-item {
        font-size: 13px;
    }
    
    .author-details,
    .course-info,
    .price-row,
    .original-price,
    .struck-price,
    .c-final-price,
    .struck-total-price {
        font-size: 15px;
    }
    .checkout-button {
        font-size: 16px;
        padding: 12px;
    }
    .checkout-amount h2 {
        font-size: 20px;
    }

    .payment-success-heading {
        font-size: 22px;
    }

    .success-continue-btn {
        font-size: 15px;
        padding: 9px 22px;
    }

    #retryPaymentBtn {
    font-size: 15px;
    padding: 9px 18px;
    }

    .payment-incomplete-heading {
        font-size: 17px;
    }
}

/* === ✅ Small Laptops (max-width: 1024px) === */
@media (max-width: 1024px) {

    .checkout-layout {
        max-width: 1000px;
        margin: 20px auto;
        padding: 0 10px;
    }

    .checkout-container {
        display: flex;
        margin: 20px auto;
        padding: 0 10px;
    }

    .checkout-list {
        width: 75%;
    }

    .checkout-item img {
        width: 70px; 
        height: 70px;
        margin-right: 10px;
        border-radius: 5px;
    }
    
    .checkout-item-details {
        width: 50%;
    }

    .checkout-item-details a {
        margin-bottom: 3px;
    }

    .course-info span {
        margin-right:4px;
    }

    .c-price-details {
        width: 25%;
    }

    .checkout-amount {
        width: 25%;
        padding: 10px;
    }

    h1 {
        font-size: 24px;
    }
    p,
    .checkout-agreement {
        font-size: 14px;
    }
    .checkout-item-details a {
        font-size: 16px;
    }

    .remove-item {
        font-size: 12px;
    }
    
    .author-details,
    .course-info,
    .price-row,
    .original-price,
    .struck-price,
    .c-final-price,
    .struck-total-price {
        font-size: 14px;
    }
    .checkout-button {
        font-size: 16px;
        padding: 10px;
    }
    .checkout-amount h2 {
        font-size: 18px;
    }

    .payment-success-heading {
        font-size: 20px;
    }

    .success-continue-btn {
        font-size: 14px;
        padding: 8px 20px;
    }

    #retryPaymentBtn {
    font-size: 14px;
    padding: 8px 16px;
    }

    .payment-incomplete-heading {
    font-size: 16px;
    }
}