/* ============================================
   CHECKOUT PAGE - COMPLETE REDESIGN
   Match 100% with CoursePlatform design
   ============================================ */

/* RESET & BASE */
* {
    box-sizing: border-box;
}

.am-main {
    background: #f5f7fa !important;
    min-height: 100vh;
    padding: 0 !important;
}

.am-checkout_section {
    background: #f5f7fa !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ============================================
   HEADER WITH LOGO & SSL BADGE
   ============================================ */
.am-checkout_section::before {
    content: '';
    display: block;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 32px;
}

.am-checkout_title {
    background: white !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 20px 0 !important;
    margin: 0 0 32px 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
    position: relative;
}

.am-checkout_title::before {
    content: '🔷 CoursePlatform';
    position: absolute;
    top: 20px;
    left: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.am-checkout_title::after {
    content: '🔒 Thanh toán bảo mật SSL';
    position: absolute;
    top: 20px;
    right: 0;
    font-size: 13px;
    font-weight: 600;
    color: #059669;
    background: #d1fae5;
    padding: 6px 16px;
    border-radius: 20px;
}

.am-checkout_logo,
.am-checkout_steptab {
    display: none !important;
}

.am-checkout_title h2 {
    font-size: 32px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 60px 0 8px 0 !important;
    text-align: left !important;
}

.am-checkout_title p {
    font-size: 15px !important;
    color: #6b7280 !important;
    margin: 0 !important;
    text-align: left !important;
}

/* ============================================
   MAIN LAYOUT - 2 COLUMNS
   ============================================ */
.am-checkout_box {
    display: grid !important;
    grid-template-columns: 1.4fr 1fr !important;
    gap: 32px !important;
    align-items: start !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ============================================
   LEFT COLUMN - FORMS
   ============================================ */
.am-checkout_methods {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Student Info Card */
.am-checkout_methods_title {
    background: white !important;
    border-radius: 16px !important;
    padding: 24px 28px !important;
    margin: 0 0 20px 0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    position: relative;
}

/* Add "Thông tin học viên" title */
.am-checkout_methods_title::before {
    content: '👤 Thông tin học viên';
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.am-checkout_methods_title::after {
    content: 'Đã xác thực';
    position: absolute;
    top: 24px;
    right: 28px;
    background: #d1fae5;
    color: #059669;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.am-checkout_methods_title h3 {
    display: none !important;
}

.am-checkout_methods_title p {
    display: none !important;
}

/* Form Grid for Name & Phone */
.am-checkout_form fieldset {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.am-checkout_form legend {
    display: none !important;
}

/* First field - Name (full width first) */
.am-checkout_form .form-group:nth-child(2) {
    display: inline-block !important;
    width: calc(50% - 8px) !important;
    margin-right: 16px !important;
}

.am-checkout_form .form-group:nth-child(2)::before {
    content: 'HỌ VÀ TÊN';
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

/* Second field - Phone */
.am-checkout_form .form-group:nth-child(3) {
    display: inline-block !important;
    width: calc(50% - 8px) !important;
    vertical-align: top !important;
}

.am-checkout_form .form-group:nth-child(3)::before {
    content: 'SỐ ĐIỆN THOẠI';
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

/* Third field - Email */
.am-checkout_form .form-group:nth-child(4) {
    display: block !important;
    width: 100% !important;
}

.am-checkout_form .form-group:nth-child(4)::before {
    content: 'EMAIL (NHẬN TÀI LIỆU & CHỨNG CHỈ)';
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

/* Payment Methods Card */
.am-checkout_accordion {
    background: white !important;
    border-radius: 16px !important;
    padding: 24px 28px !important;
    margin: 0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.am-checkout_accordion::before {
    content: '💳 Phương thức thanh toán';
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.am-checkout_accordion .accordion-item {
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    margin-bottom: 12px !important;
    background: white !important;
    transition: all 0.2s !important;
    overflow: hidden !important;
}

.am-checkout_accordion .accordion-item:has(input:checked) {
    border-color: #3b82f6 !important;
    background: #eff6ff !important;
}

.am-radiowrap {
    padding: 16px 20px !important;
    margin: 0 !important;
}

.am-radio {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.am-radio input[type="radio"] {
    width: 20px !important;
    height: 20px !important;
    accent-color: #3b82f6 !important;
    margin: 0 !important;
}

.am-radio label {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    cursor: pointer !important;
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #1a1a1a !important;
}

.am-radiowrap_img {
    display: flex !important;
    gap: 6px !important;
    align-items: center !important;
}

.am-radiowrap_img img {
    height: 20px !important;
    width: auto !important;
}

/* Security Note */
.am-checkout_accordion::after {
    content: '🔒 Mọi giao dịch điều được mã hóa và bảo vệ an toàn tuyệt đối.';
    display: block;
    margin-top: 16px;
    padding: 12px 16px;
    background: #f0fdf4;
    border-radius: 8px;
    font-size: 13px;
    color: #166534;
    text-align: center;
}

/* Form Inputs */
.form-group {
    margin-bottom: 16px !important;
}

.form-control {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    transition: all 0.2s !important;
    background: white !important;
    font-family: inherit !important;
    color: #1a1a1a !important;
}

.form-control:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.form-control::placeholder {
    color: #9ca3af !important;
}

/* Alert */
.alert {
    border-radius: 10px !important;
    padding: 12px 16px !important;
    margin: 16px 0 !important;
    border: none !important;
    font-size: 13px !important;
}

.alert-warning {
    background: #fef3c7 !important;
    color: #78350f !important;
}

/* Show password field and button */
.am-checkout_form .form-group {
    display: block !important;
}

/* Hide button in left form - only show in order summary */
.am-checkout_form .form-group.form-groupbtns {
    display: none !important;
}

/* Additional Info Section - Keep visible */
.am-checkout_form:nth-of-type(2) fieldset {
    display: block !important;
}

.am-checkout_perinfo {
    display: none !important;
}

/* ============================================
   RIGHT COLUMN - ORDER SUMMARY
   ============================================ */
.am-ordersummary {
    background: white !important;
    border-radius: 16px !important;
    padding: 0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    position: sticky !important;
    top: 20px !important;
    overflow: hidden !important;
}

.am-ordersummary_title {
    display: none !important;
}

/* Course Card */
.am-ordersummary_list {
    list-style: none !important;
    padding: 24px !important;
    margin: 0 !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

.am-ordersummary_list li {
    display: block !important;
    padding: 0 !important;
    border: none !important;
    margin: 0 !important;
}

.am-ordersummary_list_img {
    width: 100% !important;
    height: 140px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    margin-bottom: 16px !important;
    position: relative !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.am-ordersummary_list_img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Bestseller Badge */
.am-ordersummary_list_img::before {
    content: 'BESTSELLER';
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 2;
}

.am-ordersummary_list_title {
    width: 100% !important;
}

.am-ordersummary_list_info {
    width: 100% !important;
}

.am-ordersummary_list_info h3 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0 0 6px 0 !important;
    line-height: 1.4 !important;
}

.am-ordersummary_list_info h3 a {
    color: #1a1a1a !important;
    text-decoration: none !important;
}

.am-ordersummary_list_info span {
    font-size: 13px !important;
    color: #6b7280 !important;
    display: block !important;
    margin-bottom: 8px !important;
}

/* Star Rating */
.am-ordersummary_list_info::after {
    content: '⭐⭐⭐⭐⭐ (4.9/5)';
    display: block;
    font-size: 13px;
    margin-top: 8px;
}

.am-ordersummary_list_action {
    display: none !important;
}

/* Benefits Section - Already added in blade */

/* Coupon Input */
.am-checkout_coupons {
    padding: 20px 24px !important;
    margin: 0 !important;
    background: white !important;
    border-top: 1px solid #f3f4f6 !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

.am-checkout_coupons_title {
    display: none !important;
}

.am-checkout_coupons_footer {
    display: flex !important;
    gap: 12px !important;
}

.am-checkout_coupons_footer input {
    flex: 1 !important;
    padding: 12px 16px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 10px !important;
    font-size: 14px !important;
}

.am-checkout_coupons_footer input::placeholder {
    color: #9ca3af !important;
}

.am-checkout_coupons_footer .am-btn {
    width: auto !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    background: #1a1a1a !important;
    border-radius: 10px !important;
}

/* Price Summary */
.am-ordersummary_price {
    list-style: none !important;
    padding: 20px 24px !important;
    margin: 0 !important;
}

.am-ordersummary_price li {
    display: flex !important;
    justify-content: space-between !important;
    padding: 8px 0 !important;
    font-size: 15px !important;
    color: #6b7280 !important;
    border: none !important;
}

.am-ordersummary_price li:first-child span {
    color: #6b7280 !important;
}

.am-ordersummary_price li:first-child strong {
    color: #6b7280 !important;
    text-decoration: line-through !important;
    font-weight: 400 !important;
}

.am-ordersummary_price li:nth-child(2) span {
    color: #059669 !important;
}

.am-ordersummary_price li:nth-child(2) strong {
    color: #059669 !important;
    font-weight: 600 !important;
}

.am-ordersummary_price_total {
    border-top: 2px solid #f3f4f6 !important;
    padding-top: 16px !important;
    margin-top: 12px !important;
}

.am-ordersummary_price_total span {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
}

.am-ordersummary_price_total strong {
    font-size: 32px !important;
    font-weight: 700 !important;
    color: #3b82f6 !important;
}

/* Checkout Button - Move to Order Summary */
.am-ordersummary .form-group.form-groupbtns,
.form-group.form-groupbtns {
    display: block !important;
    padding: 24px !important;
    margin: 0 !important;
    background: white !important;
    border-top: 1px solid #f3f4f6 !important;
}

.am-ordersummary .form-group.form-groupbtns button,
.form-groupbtns button,
.am-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
    border: none !important;
    padding: 16px 32px !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

.am-ordersummary .form-group.form-groupbtns button:hover,
.form-groupbtns button:hover,
.am-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4) !important;
}

.am-ordersummary .form-group.form-groupbtns p,
.form-groupbtns p {
    text-align: center !important;
    margin: 12px 0 16px 0 !important;
    font-size: 13px !important;
    color: #6b7280 !important;
}

/* Payment Logos */
.am-ordersummary .form-group.form-groupbtns::after,
.form-groupbtns::after {
    content: 'VISA    MC    MOMO    ZALO';
    display: block;
    text-align: center;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 16px;
    letter-spacing: 4px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 991px) {
    .am-checkout_box {
        grid-template-columns: 1fr !important;
    }

    .am-ordersummary {
        position: static !important;
    }

    .am-checkout_form .form-group:nth-child(2),
    .am-checkout_form .form-group:nth-child(3) {
        width: 100% !important;
        margin-right: 0 !important;
    }
}

/* Loading */
.am-section-load {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: white !important;
    padding: 32px 48px !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
    z-index: 9999 !important;
}

/* Hide unwanted elements */
.am-w-full {
    width: 100% !important;
}