/**
 * Checkout Page Styles - Clean Version
 */

/* Hide WordPress admin bar */
#wpadminbar {
    display: none !important;
}

html {
    margin-top: 0 !important;
}

/* ==================== BODY ==================== */
body {
    background: #ffffff !important;
}

hr {
    display:none;
}

#header h1 {
    display: none !important;
}

/* ==================== ALERT NOTIFICATIONS ==================== */
.etinion-alert {
    position: relative;
    padding: 14px 45px 14px 45px;
    margin-bottom: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    line-height: 1.5;
    animation: slideDown 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.etinion-alert-error {
    background: #fee;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.etinion-alert-success {
    background: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.etinion-alert .alert-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.etinion-alert .alert-message {
    flex: 1;
    font-weight: 500;
}

.etinion-alert .alert-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.etinion-alert .alert-close:hover {
    opacity: 1;
}

/* Hide footer in checkout */
.etinion-checkout-wrapper ~ footer,
div#footer {
    display: none !important;
}

/* ==================== CHECKOUT WRAPPER ==================== */
.etinion-checkout-wrapper {
    min-height: 100vh;
    background: #f8f9fa;
    padding: 0px 0px 10px;
    padding-bottom: 120px; /* Space for mobile footer */
}

.checkout-error-state {
    max-width: 560px;
    margin: 80px auto;
    padding: 32px;
    background: #fff;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.checkout-error-state h2 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 22px;
    color: #111827;
}

.checkout-error-state p {
    color: #6b7280;
    margin-bottom: 20px;
}

/* Force hide during skeleton loading */
.etinion-checkout-wrapper[style*="display: none"] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
}

/* ==================== CHECKOUT HEADER ==================== */
.etinion-checkout-header {
    background: #fff;
    border-radius: 0px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.checkout-header-container {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.checkout-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #374151;
    transition: all 0.2s;
    text-decoration: none;
}

.checkout-back-btn:hover {
    background: #e5e7eb;
}

.checkout-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    flex: 1;
}

.checkout-login-link {
    font-size: 14px;
    font-weight: 500;
    color: #6C5DD3;
    text-decoration: none;
}

/* ==================== CHECKOUT CONTAINER ==================== */
.etinion-checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
}

/* ==================== CHECKOUT SECTIONS ==================== */
.checkout-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 20px;
}

/* ==================== USER DETAILS ==================== */
.user-details-box {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 14px;
    color: #6b7280;
}

.detail-value {
    font-size: 14px;
    color: #111827;
    font-weight: 600;
}

/* Compact User Details (Logged In) */
.user-details-compact {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px 20px;
}

.user-details-compact .user-name {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
}

.user-details-compact .user-contact {
    font-size: 14px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.user-details-compact .user-email {
    color: #374151;
}

.user-details-compact .contact-separator {
    color: #d1d5db;
}

.user-details-compact .user-phone {
    color: #374151;
}

/* ==================== FORM FIELDS ==================== */
.checkout-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-group label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.field-group small {
    font-size: 12px;
}

.checkout-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    color: #111827;
    transition: all 0.2s;
    box-sizing: border-box;
}

.checkout-input:focus {
    outline: none;
    border-color: #6C5DD3;
    box-shadow: 0 0 0 3px rgba(108, 93, 211, 0.1);
}

.field-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.field-group.has-error .checkout-input {
    border-color: #dc2626;
}

.field-group.has-error .field-error {
    display: block;
}

/* Password toggle */
.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #6b7280;
}

/* Payment Methods - CLEAN REWRITE */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-method-card {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    background: #fff;
}

.payment-method-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.pm-radio {
    width: 20px;
    height: 20px;
    accent-color: #6C5DD3;
}

.pm-label {
    flex: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.pm-info {
    flex: 1;
}

.pm-name {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.pm-desc {
    font-size: 13px;
    color: #6b7280;
}

/* Bank Accounts List - SIMPLE TOGGLE */
.bank-accounts-list {
    display: none; /* Hidden by default */
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.etinion-checkout-wrapper .bundle-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    background: #EEF2FF;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: #3730A3;
    margin-top: 4px;
}

.bank-list-container.has-error {
    animation: shake 0.5s;
}

.bank-list-container.has-error .bank-accounts-list {
    border: 2px solid #ef4444;
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
}
.etinion-checkout-wrapper .bundle-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 12px;
}

.etinion-checkout-wrapper .bundle-course-names {
    font-weight: 500;
    font-size: 12px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.bank-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.bank-option:hover {
    background: #f9fafb;
    border-color: #6C5DD3;
}

.bank-option.selected {
    background: #bcdbfb1f;
    border-color: var(--button-color);
}

.bank-radio {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color)
}

.bank-name {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}

/* ==================== ORDER SUMMARY ==================== */
.checkout-sidebar {
    position: sticky;
    top: 24px;
}

.order-summary {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.order-summary h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 20px;
}

.order-items {
    margin-bottom: 20px;
}

.order-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.order-item:last-child {
    border-bottom: none;
}


.order-item .bundle-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    background: #f1f4ff;
    border: 1px solid #dbe3ff;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    color: #1f2a56;
    margin-top: 10px;
    width: 100%;
}

.order-item .bundle-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
    color: #3f4db5;
}

.order-item .bundle-course-names {
    font-weight: 600;
    font-size: 13px;
    color: #111827;
    line-height: 1.4;
}
.order-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.order-item-details {
    flex: 1;
}

.order-item-details .bundle-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    background: #eef2ff;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: #3730a3;
    margin-top: 4px;
}

.order-item-details .bundle-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 12px;
}

.order-item-details .bundle-course-names {
    font-weight: 500;
    font-size: 12px;
}

.order-item-title {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    margin-bottom: 4px;
}

.order-item-price {
    font-size: 14px;
    font-weight: 600;
    color: #6C5DD3;
}

.order-item-meta {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.price-old {
    font-size: 13px;
    color: #9ca3af;
    text-decoration: line-through;
    margin-right: 8px;
}

.price-current {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.price-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    margin-left: 8px;
    border-radius: 999px;
    background: #f3f2ff;
    color: #5b4fc7;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-note {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
}

.coupon-disabled-note {
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
}

.subscription-order-item {
    align-items: flex-start;
}

.order-item-remove {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
}

/* Summary Totals */
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0px 0;
    font-size: 14px;
    color: #6b7280;
}

.summary-row.total-row {
    border-top: 2px solid #e5e7eb;
    padding-top: 16px;
    margin-top: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    padding-top: 10px !important;
}

.discount-row {
    color: #059669;
}

/* Coupon */
.coupon-toggle {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 14px;
    cursor: pointer;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.applied-voucher-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #EEF2FF;
    border: 1px solid #C7D2FE;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.voucher-pill {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.voucher-label {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4338CA;
}

.voucher-code {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.voucher-remove-btn {
    border: none;
    background: transparent;
    color: #6B7280;
    font-size: 20px;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.voucher-remove-btn:hover {
    color: #DC2626;
}

.coupon-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.coupon-input-group input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
}

.coupon-input-group button {
    padding: 10px 20px;
    background: #6C5DD3;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.coupon-input-group button:hover {
    background: #5b4fc7;
}

.voucher-row span:first-child {
    font-weight: 500;
    color: #374151;
}

/* Checkout Button */
.checkout-submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--button-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 20px;
}

.checkout-submit-btn:hover {
    background: var(--button-hover-color);
}

.checkout-submit-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

/* ==================== MOBILE FOOTER ==================== */
.checkout-mobile-footer {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 16px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    z-index: 999;
}

.mobile-footer-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
}

.btn-mobile-checkout {
    width: 100%;
    padding: 14px;
    background: #6C5DD3;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

/* ==================== LOADING OVERLAY ==================== */
.checkout-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.loading-content {
    text-align: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    padding: 40px 60px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.loading-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    position: relative;
}

.spinner-ring {
    width: 100%;
    height: 100%;
    animation: rotate 2s linear infinite;
}

.spinner-ring circle {
    stroke: #6C5DD3;
    stroke-linecap: round;
    stroke-dasharray: 1, 200;
    stroke-dashoffset: 0;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 200;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 200;
        stroke-dashoffset: -35px;
    }
    100% {
        stroke-dasharray: 90, 200;
        stroke-dashoffset: -125px;
    }
}

.spinner-check {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.spinner-check circle {
    stroke: #10b981;
    stroke-linecap: round;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: fillCircle 0.6s ease-in-out forwards;
}

@keyframes fillCircle {
    to {
        stroke-dashoffset: 0;
    }
}

.spinner-check .check-mark {
    stroke: #10b981;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: drawCheck 0.6s ease-in-out 0.3s forwards;
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

.loading-text {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: #fff;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* ==================== SKELETON LOADING ==================== */
#checkout-skeleton {
    min-height: 100vh;
    background: #f8f9fa;
    padding-bottom: 120px;
}

.skeleton-loader {
    display: block;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton-checkout-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.skeleton-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.skeleton-title {
    height: 24px;
    width: 150px;
    margin-bottom: 20px;
}

.skeleton-field {
    margin-bottom: 16px;
}

.skeleton-label {
    height: 14px;
    width: 120px;
    margin-bottom: 8px;
}

.skeleton-input {
    height: 44px;
    width: 100%;
    border-radius: 8px;
}

.skeleton-radio {
    height: 80px;
    width: 100%;
    border-radius: 8px;
    margin-bottom: 12px;
}

.skeleton-bank-list {
    height: 140px;
    width: 100%;
    border-radius: 8px;
}

.skeleton-order-item {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.skeleton-item-image {
    width: 80px;
    height: 53px;
    border-radius: 6px;
}

.skeleton-item-text {
    flex: 1;
}

.skeleton-item-title {
    height: 16px;
    width: 70%;
    margin-bottom: 8px;
}

.skeleton-item-price {
    height: 14px;
    width: 40%;
}

.skeleton-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.skeleton-summary-label {
    height: 14px;
    width: 80px;
}

.skeleton-summary-value {
    height: 14px;
    width: 100px;
}

.skeleton-button {
    height: 52px;
    width: 100%;
    border-radius: 10px;
    margin-top: 16px;
}

.skeleton-bank-detail {
    height: 60px;
    width: 100%;
    margin-bottom: 12px;
    border-radius: 8px;
}

/* Hide skeleton when content loaded */
.content-loaded .skeleton-loader,
.content-loaded .skeleton-checkout-grid {
    display: none;
}

.etinion-thankyou-page .bundle-info,
.etinion-thankyou-wrapper .bundle-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    background: #f1f4ff;
    border: 1px solid #dbe3ff;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    color: #1f2a56;
    margin-top: 8px;
    width: 100%;
}

.etinion-thankyou-page .bundle-pill,
.etinion-thankyou-wrapper .bundle-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
    color: #3f4db5;
}

.etinion-thankyou-page .bundle-course-names,
.etinion-thankyou-wrapper .bundle-course-names {
    font-weight: 600;
    font-size: 13px;
    color: #111827;
    line-height: 1.4;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 991px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    
    .checkout-sidebar {
        position: static;
    }
    
    .checkout-mobile-footer {
        display: block;
    }

    /* Skeleton Responsive */
    .skeleton-checkout-grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .skeleton-section {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .etinion-checkout-wrapper {
        padding: 12px;
    }
    
    .checkout-section {
        padding: 16px;
    }
    
    .order-summary {
        padding: 16px;
    }

    /* Skeleton Mobile */
    .skeleton-checkout-grid {
        gap: 16px;
        padding: 12px;
    }

    .skeleton-item-image {
        width: 60px;
        height: 40px;
    }

    .skeleton-title {
        width: 120px;
        height: 20px;
    }

    /* Compact User Details Mobile */
    .user-details-compact {
        padding: 12px 16px;
    }

    .user-details-compact .user-name {
        font-size: 15px;
    }

    .user-details-compact .user-contact {
        font-size: 13px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .user-details-compact .contact-separator {
        display: none;
    }
}

