/* WMDM Cart Checkout - Inline Checkout Styles */

/* Hide minicart dropdown - cart icon links directly to cart page */
.minicart-wrapper .cdz-dd-content {
    display: none !important;
}

.wmdm-inline-checkout {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    padding: 24px;
    margin-top: 20px;
    border: 1px solid rgba(245, 132, 31, 0.2);
}

/* Section Header */
.checkout-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.checkout-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(245, 132, 31, 0.15);
    border-radius: 8px;
    color: #F5841F;
}

.checkout-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

/* Express Checkout Section */
.express-checkout-section {
    margin-bottom: 20px;
}

.express-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Stripe Express Checkout Element (Apple Pay, Google Pay, Link) */
.stripe-express-checkout {
    min-height: 48px;
}

/* Style the Stripe express buttons container */
.express-buttons .StripeElement,
.express-buttons .stripe-express-checkout,
.express-buttons iframe {
    width: 100% !important;
    border-radius: 8px;
}

/* PayPal express section spacing */
.express-checkout-paypal {
    margin-bottom: 0;
}

.or-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin-top: 20px;
}

.or-divider::before,
.or-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.or-divider span {
    padding: 0 16px;
    font-size: 13px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Form Styles */
.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Email group spacing before express buttons */
.email-group,
.email-display {
    margin-bottom: 16px;
}

.email-group .form-input,
.email-display .email-value {
    width: 100%;
    box-sizing: border-box;
}

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: #a0a0a0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    background: #16213e !important;
    border: 1px solid #0f3460 !important;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 15px;
    color: #ffffff !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Rubik', system-ui, sans-serif;
}

.form-input::placeholder {
    color: #6b7280;
}

.form-input:focus {
    outline: none;
    border-color: #F5841F;
    box-shadow: 0 0 0 3px rgba(245, 132, 31, 0.15);
}

.form-input.error {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
}

/* Email Display (logged in users) */
.email-display .email-value {
    background: rgba(245, 132, 31, 0.1);
    border: 1px solid rgba(245, 132, 31, 0.2);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 15px;
    color: #F5841F;
}

/* Error Messages */
.field-error {
    font-size: 13px;
    color: #ff6b6b;
    display: none;
}

/* Stripe Payment Element Container */
.stripe-payment-element {
    min-height: 120px;
    background: transparent;
}

.payment-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 0;
    color: #a0a0a0;
}

/* Spinners */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(245, 132, 31, 0.3);
    border-top-color: #F5841F;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Pay Button */
button.pay-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #F5841F 0%, #e07318 100%);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    font-family: 'Rubik', system-ui, sans-serif;
}

button.pay-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #e07318 0%, #cc6615 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 132, 31, 0.3);
}

button.pay-button:active:not(:disabled) {
    transform: translateY(0);
}

button.pay-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Trust Signals */
.trust-signals {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
}

.trust-item svg {
    color: #10b981;
}

.stripe-badge {
    color: #6772e5;
}

.stripe-badge svg {
    color: #6772e5;
}

/* Success Message */
.checkout-success {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    margin-bottom: 20px;
}

.checkout-success h3 {
    font-size: 22px;
    font-weight: 600;
    color: #10b981;
    margin-bottom: 10px;
}

.checkout-success p {
    font-size: 14px;
    color: #a0a0a0;
}

/* ========================================
   Coupon Block Styles
   ======================================== */

.wmdm-coupon-block {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(245, 132, 31, 0.2);
}

.coupon-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.coupon-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(245, 132, 31, 0.15);
    border-radius: 8px;
    color: #F5841F;
}

.coupon-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.wmdm-coupon-form {
    margin: 0;
}

.coupon-input-group {
    display: flex;
    gap: 10px;
}

.coupon-input,
input#coupon_code {
    flex: 1;
    background: #16213e !important;
    border: 1px solid #0f3460 !important;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    color: #ffffff !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Rubik', system-ui, sans-serif;
}

.coupon-input::placeholder {
    color: #6b7280;
}

.coupon-input:focus {
    outline: none;
    border-color: #F5841F;
    box-shadow: 0 0 0 3px rgba(245, 132, 31, 0.15);
}

.coupon-apply-btn {
    background: linear-gradient(135deg, #F5841F 0%, #e07318 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: 'Rubik', system-ui, sans-serif;
}

.coupon-apply-btn:hover {
    background: linear-gradient(135deg, #e07318 0%, #cc6615 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 132, 31, 0.3);
}

.coupon-apply-btn:active {
    transform: translateY(0);
}

/* Applied coupon state */
.coupon-applied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 12px 14px;
}

.applied-code {
    display: flex;
    align-items: center;
    gap: 8px;
}

.code-label {
    font-size: 13px;
    color: #a0a0a0;
}

.code-value {
    font-size: 14px;
    font-weight: 600;
    color: #10b981;
    text-transform: uppercase;
}

.remove-coupon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 107, 107, 0.1);
    border: none;
    border-radius: 6px;
    color: #ff6b6b;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.remove-coupon:hover {
    background: rgba(255, 107, 107, 0.2);
}

.coupon-error-msg {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 6px;
    padding: 0 2px;
}

.coupon-error-msg.coupon-success-msg {
    color: #4CAF50;
}

/* Hide default Magento discount block */
.cart-summary .block.discount:not(.wmdm-coupon-block) {
    display: none !important;
}

/* Hide cart summary order total (shown in Pay button instead) */
.cart-summary .grand.totals,
.cart-totals .grand.totals,
table.totals tr.grand.totals {
    display: none !important;
}

/* ========================================
   Inline Set-Password (after order success)
   ======================================== */

.wmdm-set-password-inline {
    text-align: center;
    padding: 30px 20px;
}

.wmdm-set-password-inline .success-check {
    margin-bottom: 16px;
}

.wmdm-set-password-inline .success-heading {
    font-size: 22px;
    font-weight: 600;
    color: #10b981;
    margin: 0 0 6px;
}

.wmdm-set-password-inline .success-order {
    font-size: 14px;
    color: #a0a0a0;
    margin: 0 0 20px;
}

.wmdm-set-password-inline .password-prompt {
    font-size: 15px;
    color: #d1d5db;
    margin: 0 0 20px;
}

.wmdm-set-password-inline .set-password-form {
    max-width: 360px;
    margin: 0 auto;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wmdm-set-password-inline .set-password-form .form-group {
    gap: 6px;
}

.wmdm-set-password-inline .set-password-form .form-input {
    width: 100%;
    box-sizing: border-box;
}

.skip-password-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    font-family: 'Rubik', system-ui, sans-serif;
}

.skip-password-btn:hover {
    color: #a0a0a0;
    border-color: rgba(255, 255, 255, 0.25);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wmdm-inline-checkout {
        padding: 20px 16px;
        margin-top: 16px;
    }

    .checkout-section-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .checkout-title {
        font-size: 16px;
    }

    .checkout-form {
        gap: 16px;
    }

    .form-input {
        padding: 12px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    button.pay-button {
        padding: 14px 20px;
        font-size: 15px;
    }

    .trust-signals {
        flex-direction: column;
        gap: 10px;
    }

    .wmdm-coupon-block {
        padding: 16px;
    }

    .coupon-input-group {
        flex-direction: column;
    }

    .coupon-apply-btn {
        width: 100%;
    }
}

.cart-container .cart.main.actions { display: none !important; }

.checkout-cart-index .cart-container > .cart-summary {
    flex: 0 0 auto;
    width: fit-content;
    order: 2;
    margin-top: 20px;
}
.cart-container:before {
    background: none !important;
}

.wmdm-powered-stripe {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 0;
    margin-top: 10px;
    font-size: 13px;
    color: #6b7280;
}
.wmdm-powered-stripe svg:first-child {
    color: #10b981;
}
.wmdm-powered-stripe__divider {
    color: #d1d5db;
}
.wmdm-powered-stripe .wmdm-stripe-logo {
    color: #6772e5;
}
#express-checkout-stripe-section { margin-bottom: 10px !important; }

.stripe-text { font-weight: 700; font-size: 14px; margin-left: 4px; }

/* ========================================
   Success Page - Set Password Section
   (extracted from set-password.phtml)
   ======================================== */

.wmdm-success-page .page-main .page-title-wrapper,
.wmdm-success-page .page-main .checkout-success {
    text-align: center;
}
.wmdm-success-page .page-main .columns .column.main {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.wmdm-success-page .page-main .page-title-wrapper {
    width: 100%;
}
.wmdm-success-page .checkout-success {
    width: 100%;
    max-width: 600px;
}
.wmdm-set-password-section {
    margin-top: 30px;
}

.wmdm-set-password-section .set-password-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    padding: 28px;
    max-width: 400px;
    margin: 0 auto;
    border: 1px solid rgba(245, 132, 31, 0.2);
}

.wmdm-set-password-section .set-password-header {
    text-align: center;
    margin-bottom: 24px;
}

.wmdm-set-password-section .header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(245, 132, 31, 0.15);
    border-radius: 12px;
    color: #F5841F;
    margin-bottom: 16px;
}

.wmdm-set-password-section .set-password-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.wmdm-set-password-section .set-password-header p {
    font-size: 14px;
    color: #a0a0a0;
    margin: 0;
}

.wmdm-set-password-section .set-password-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.wmdm-set-password-section .set-password-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wmdm-set-password-section .set-password-form .form-label {
    font-size: 12px;
    font-weight: 500;
    color: #a0a0a0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wmdm-set-password-section .set-password-form .form-input {
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 15px;
    color: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wmdm-set-password-section .set-password-form .form-input:focus {
    outline: none;
    border-color: #F5841F;
    box-shadow: 0 0 0 3px rgba(245, 132, 31, 0.15);
}

.wmdm-set-password-section .set-password-form .form-input.error {
    border-color: #ff6b6b;
}

.wmdm-set-password-section .set-password-form .email-display {
    background: rgba(245, 132, 31, 0.1);
    border: 1px solid rgba(245, 132, 31, 0.2);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    color: #F5841F;
}

.wmdm-set-password-section .field-hint {
    font-size: 12px;
    color: #6b7280;
}

.wmdm-set-password-section .set-password-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #F5841F 0%, #e07318 100%);
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wmdm-set-password-section .set-password-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #e07318 0%, #cc6615 100%);
}

.wmdm-set-password-section .set-password-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wmdm-set-password-section .skip-button {
    background: transparent;
    border: none;
    padding: 10px;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.2s ease;
}

.wmdm-set-password-section .skip-button:hover {
    color: #a0a0a0;
}

.wmdm-set-password-section .password-success {
    text-align: center;
    padding: 20px 0;
}

.wmdm-set-password-section .password-success .success-icon {
    margin-bottom: 16px;
}

.wmdm-set-password-section .password-success h4 {
    font-size: 18px;
    font-weight: 600;
    color: #10b981;
    margin: 0 0 8px 0;
}

.wmdm-set-password-section .password-success p {
    font-size: 14px;
    color: #a0a0a0;
    margin: 0;
}

.wmdm-set-password-section .password-success a {
    color: #F5841F;
    text-decoration: none;
}

.wmdm-set-password-section .password-success a:hover {
    text-decoration: underline;
}

/* ========================================
   Standalone Set-Password Page
   (extracted from set-password-page.phtml)
   ======================================== */

.wmdm-set-password-page {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    min-height: 50vh;
}

.wmdm-set-password-page .set-password-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    padding: 32px;
    max-width: 420px;
    width: 100%;
    border: 1px solid rgba(245, 132, 31, 0.2);
}

.wmdm-set-password-page .set-password-header {
    text-align: center;
    margin-bottom: 28px;
}

.wmdm-set-password-page .header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(245, 132, 31, 0.15);
    border-radius: 12px;
    color: #F5841F;
    margin-bottom: 16px;
}

.wmdm-set-password-page h3 {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 10px 0;
}

.wmdm-set-password-page .set-password-header p {
    font-size: 14px;
    color: #a0a0a0;
    margin: 0;
}

.wmdm-set-password-page .set-password-header strong {
    color: #F5841F;
}

.wmdm-set-password-page .set-password-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.wmdm-set-password-page .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wmdm-set-password-page .form-label {
    font-size: 12px;
    font-weight: 500;
    color: #a0a0a0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wmdm-set-password-page .form-input {
    background: #16213e !important;
    border: 1px solid #0f3460 !important;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 15px;
    color: #ffffff !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.wmdm-set-password-page .form-input:focus {
    outline: none;
    border-color: #F5841F !important;
    box-shadow: 0 0 0 3px rgba(245, 132, 31, 0.15);
}

.wmdm-set-password-page .form-input.error {
    border-color: #ff6b6b !important;
}

.wmdm-set-password-page .field-hint {
    font-size: 12px;
    color: #6b7280;
}

.wmdm-set-password-page .field-error {
    font-size: 12px;
    color: #ff6b6b;
    display: none;
}

.wmdm-set-password-page .set-password-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #F5841F 0%, #e07318 100%);
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 6px;
}

.wmdm-set-password-page .set-password-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #e07318 0%, #cc6615 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 132, 31, 0.3);
}

.wmdm-set-password-page .set-password-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wmdm-set-password-page .password-success {
    text-align: center;
    padding: 20px 0;
}

.wmdm-set-password-page .success-icon {
    margin-bottom: 16px;
}

.wmdm-set-password-page .password-success h4 {
    font-size: 18px;
    font-weight: 600;
    color: #10b981;
    margin: 0 0 10px 0;
}

.wmdm-set-password-page .password-success p {
    font-size: 14px;
    color: #a0a0a0;
    margin: 0;
}

.wmdm-set-password-page .password-success a {
    color: #F5841F;
    text-decoration: none;
    font-weight: 600;
}

.wmdm-set-password-page .password-success a:hover {
    text-decoration: underline;
}

.wmdm-set-password-page .button-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wmdm-set-password-page .spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@media (max-width: 768px) {
    .wmdm-set-password-page {
        padding: 20px 16px;
    }
    .wmdm-set-password-page .set-password-container {
        padding: 24px 20px;
    }
}

/* Mobile cart overflow fix — constrain items to viewport */
@media (max-width: 768px) {
    .wmdm-product-list,
    .wmdm-cart-list { max-width: 100% !important; overflow: hidden; }
    .wmdm-cart-item,
    .wmdm-product-item { width: 100% !important; min-width: 0 !important; max-width: 100% !important; box-sizing: border-box !important; overflow: hidden; }
    .wmdm-cart-body,
    .wmdm-card-body { max-width: 100% !important; box-sizing: border-box !important; }
    .wmdm-cart-meta,
    .wmdm-card-meta { overflow: hidden !important; }
    .wmdm-cart-controls { max-width: 100% !important; }
    .wmdm-cart-actions { max-width: 100% !important; }
    .wmdm-cart-license-cards { max-width: 100% !important; flex-wrap: wrap !important; }
    .cart.table-wrapper { overflow: hidden !important; max-width: 100% !important; }
    .form-cart { overflow: hidden !important; max-width: 100% !important; }
}
