/**
 * SIM Selector - Order Type Modal
 * עיצוב מודרני ורספונסיבי
 */

/* CSS Variables - Brand Colors */
:root {
    --rlpm-primary: #B3157F;
    --rlpm-primary-dark: #8B1166;
    --rlpm-success: #10b981;
    --rlpm-success-bg: #d1fae5;
    --rlpm-warning: #f59e0b;
    --rlpm-warning-bg: #fef3c7;
    --rlpm-error: #ef4444;
    --rlpm-error-bg: #fee2e2;
    --rlpm-gray-50: #f9fafb;
    --rlpm-gray-100: #f3f4f6;
    --rlpm-gray-200: #e5e7eb;
    --rlpm-gray-300: #d1d5db;
    --rlpm-gray-400: #9ca3af;
    --rlpm-gray-500: #6b7280;
    --rlpm-gray-600: #4b5563;
    --rlpm-gray-700: #374151;
    --rlpm-gray-800: #1f2937;
    --rlpm-gray-900: #111827;
    --rlpm-radius: 12px;
    --rlpm-radius-sm: 8px;
    --rlpm-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --rlpm-shadow-lg: 0 25px 50px -12px rgba(0,0,0,0.25);
    --rlpm-transition: all 0.2s ease;
}

/* Force white text on all buttons inside modal — overrides theme gradient-text tricks */
#rlpm-order-modal button,
#rlpm-order-modal [type="button"],
#rlpm-order-modal [type="submit"] {
    -webkit-text-fill-color: unset !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
}

#rlpm-order-modal .rlpm-upsell-submit-btn,
#rlpm-order-modal .rlpm-physical-continue,
#rlpm-order-modal .rlpm-add-btn {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
}

/* Modal Base */
.rlpm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    direction: rtl;
}

.rlpm-modal.active {
    opacity: 1;
    visibility: visible;
}

.rlpm-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.rlpm-modal-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    margin: 16px;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
}

.rlpm-modal.active .rlpm-modal-container {
    transform: scale(1) translateY(0);
}

.rlpm-modal-content {
    background: white;
    border-radius: var(--rlpm-radius);
    box-shadow: var(--rlpm-shadow-lg);
    overflow: hidden;
    max-height: 85vh;
    overflow-y: auto;
}

/* Scrollbar */
.rlpm-modal-content::-webkit-scrollbar {
    width: 6px;
}

.rlpm-modal-content::-webkit-scrollbar-track {
    background: var(--rlpm-gray-100);
}

.rlpm-modal-content::-webkit-scrollbar-thumb {
    background: var(--rlpm-gray-300);
    border-radius: 3px;
}

/* Close Button */
.rlpm-modal-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--rlpm-gray-100);
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    color: var(--rlpm-gray-500);
    cursor: pointer;
    transition: var(--rlpm-transition);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rlpm-modal-close:hover {
    background: var(--rlpm-gray-200);
    color: var(--rlpm-gray-700);
}

/* Header */
.rlpm-modal-header {
    padding: 22px 24px 16px;
    text-align: center;
    border-bottom: 1px solid var(--rlpm-gray-100);
    background: linear-gradient(180deg, #fdf4fb 0%, #ffffff 100%);
    position: relative;
}

.rlpm-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rlpm-primary), #e040b0, var(--rlpm-primary-dark));
}

.rlpm-product-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--rlpm-gray-900);
    margin: 0 0 4px;
    padding: 0;
    line-height: 1.3;
}

.rlpm-product-price {
    font-size: 16px;
    color: var(--rlpm-primary);
    font-weight: 700;
}

/* Quantity Row */
.rlpm-quantity-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 24px;
    background: var(--rlpm-gray-50);
    border-bottom: 1px solid var(--rlpm-gray-100);
}

.rlpm-quantity-row label {
    font-size: 14px;
    font-weight: 600;
    color: var(--rlpm-gray-700);
}

.rlpm-quantity-control {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--rlpm-gray-200);
    border-radius: var(--rlpm-radius-sm);
    overflow: hidden;
}

.rlpm-qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    font-size: 18px;
    font-weight: 600;
    color: var(--rlpm-gray-600);
    cursor: pointer;
    transition: var(--rlpm-transition);
}

.rlpm-qty-btn:hover {
    background: var(--rlpm-gray-100);
    color: var(--rlpm-primary);
}

.rlpm-qty-btn:active {
    background: var(--rlpm-gray-200);
}

#rlpm-quantity {
    width: 56px;
    height: 40px;
    border: none;
    border-right: 1px solid var(--rlpm-gray-200);
    border-left: 1px solid var(--rlpm-gray-200);
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--rlpm-gray-800);
    background: white;
    -moz-appearance: textfield;
}

#rlpm-quantity::-webkit-inner-spin-button,
#rlpm-quantity::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Type Options */
.rlpm-type-options {
    padding: 16px;
}

/* Type Card - Enhanced */
.rlpm-type-card {
    background: white;
    border: 2px solid var(--rlpm-gray-200);
    border-radius: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.rlpm-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rlpm-primary), var(--rlpm-primary-dark));
    transform: scaleX(0);
    transition: transform 0.3s ease;
    z-index: 2;
}

.rlpm-type-card:hover {
    border-color: var(--rlpm-primary);
    transform: translateX(-4px);
    box-shadow: 
        8px 0 25px -5px rgba(179, 21, 127, 0.2),
        0 4px 15px rgba(0,0,0,0.08);
}

.rlpm-type-card:hover::before {
    transform: scaleX(1);
}

.rlpm-type-card.expanded {
    border-color: var(--rlpm-primary);
    box-shadow: 0 8px 30px rgba(179, 21, 127, 0.15);
}

.rlpm-type-card.expanded::before {
    transform: scaleX(1);
}

.rlpm-type-card.disabled {
    pointer-events: none;
    opacity: 0.5;
}

/* Type Header */
.rlpm-type-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.rlpm-type-icon {
    font-size: 28px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--rlpm-gray-100), var(--rlpm-gray-50));
    border-radius: 14px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
}

.rlpm-type-card:hover .rlpm-type-icon {
    background: linear-gradient(135deg, var(--rlpm-primary), var(--rlpm-primary-dark));
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 4px 12px rgba(179, 21, 127, 0.3);
    color: white;
}

.rlpm-type-info {
    flex: 1;
    min-width: 0;
}

.rlpm-type-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--rlpm-gray-900);
    margin: 0 0 2px;
}

.rlpm-type-info p {
    font-size: 13px;
    color: var(--rlpm-gray-500);
    margin: 0;
}

.rlpm-type-arrow {
    font-size: 24px;
    color: var(--rlpm-gray-400);
    transition: var(--rlpm-transition);
}

.rlpm-type-card.expanded .rlpm-type-arrow {
    transform: rotate(90deg);
}

/* Type Body (expandable) */
.rlpm-type-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 16px;
    background: var(--rlpm-gray-50);
    border-top: 0 solid var(--rlpm-gray-200);
}

.rlpm-type-card.expanded .rlpm-type-body {
    max-height: 500px;
    padding: 16px;
    border-top-width: 1px;
}

/* Type Badge */
.rlpm-type-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Simple Type Cards (eSIM, Physical) */
.rlpm-type-simple {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.rlpm-type-simple .rlpm-type-icon {
    transition: var(--rlpm-transition);
}

.rlpm-type-simple:hover .rlpm-type-icon {
    transform: scale(1.1);
    background: var(--rlpm-primary);
    color: white;
}

/* Divider */
.rlpm-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
}

.rlpm-divider::before,
.rlpm-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rlpm-gray-200);
}

.rlpm-divider span {
    font-size: 12px;
    color: var(--rlpm-gray-400);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* Phone Inputs */
.rlpm-phones-container {
    margin-bottom: 16px;
}

.rlpm-phone-row {
    margin-bottom: 12px;
}

.rlpm-phone-row:last-child {
    margin-bottom: 0;
}

.rlpm-phone-row label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--rlpm-gray-600);
    margin-bottom: 6px;
}

.rlpm-phone-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.rlpm-phone-input {
    width: 100%;
    height: 48px;
    padding: 0 40px 0 16px;
    border: 2px solid var(--rlpm-gray-200);
    border-radius: var(--rlpm-radius-sm);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 1px;
    direction: ltr;
    text-align: left;
    transition: var(--rlpm-transition);
    background: white;
}

.rlpm-phone-input::placeholder {
    color: var(--rlpm-gray-400);
    font-weight: 400;
    letter-spacing: 0;
}

.rlpm-phone-input:focus {
    outline: none;
    border-color: var(--rlpm-primary);
    box-shadow: 0 0 0 3px rgba(179, 21, 127, 0.1);
}

.rlpm-phone-wrapper.valid .rlpm-phone-input {
    border-color: var(--rlpm-success);
}

.rlpm-phone-wrapper.invalid .rlpm-phone-input {
    border-color: var(--rlpm-error);
}

.rlpm-phone-status {
    position: absolute;
    left: 12px;
    font-size: 18px;
    font-weight: 700;
}

.rlpm-phone-wrapper.valid .rlpm-phone-status {
    color: var(--rlpm-success);
}

.rlpm-phone-wrapper.invalid .rlpm-phone-status {
    color: var(--rlpm-error);
}

/* Add Button - Enhanced with Glow Effect */
.rlpm-add-btn {
    width: 100%;
    height: 52px;
    border: none;
    background: linear-gradient(135deg, var(--rlpm-primary) 0%, var(--rlpm-primary-dark) 100%);
    color: white;
    font-size: 17px;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.rlpm-add-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.rlpm-add-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(179, 21, 127, 0.45),
        0 0 20px rgba(179, 21, 127, 0.3);
}

.rlpm-add-btn:hover::before {
    left: 100%;
}

.rlpm-add-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(179, 21, 127, 0.4);
}

/* Loading */
.rlpm-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    opacity: 0;
    visibility: hidden;
    transition: var(--rlpm-transition);
    z-index: 10;
    border-radius: var(--rlpm-radius);
}

.rlpm-loading.active {
    opacity: 1;
    visibility: visible;
}

.rlpm-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--rlpm-gray-200);
    border-top-color: var(--rlpm-primary);
    border-radius: 50%;
    animation: rlpm-spin 0.8s linear infinite;
}

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

.rlpm-loading span {
    font-size: 14px;
    color: var(--rlpm-gray-600);
    font-weight: 500;
}

/* Toast Messages */
.rlpm-toast,
.rlpm-error-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    z-index: 9999999;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.rlpm-toast.show,
.rlpm-error-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.rlpm-toast-success {
    background: linear-gradient(135deg, var(--rlpm-success) 0%, #059669 100%);
    color: white;
}

.rlpm-error-toast {
    background: linear-gradient(135deg, var(--rlpm-error) 0%, #dc2626 100%);
    color: white;
}

/* Cart Updated Animation */
@keyframes rlpm-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.rlpm-cart-updated {
    animation: rlpm-pulse 0.4s ease;
}

/* Body class when modal is open */
body.rlpm-modal-open {
    overflow: hidden;
}

/* Custom Buy Button (Shortcode) - 3D Effect */
.rlpm-buy-button,
.rlpm-sim-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    width: 80% !important;
    max-width: none !important;
    margin: 0 auto !important;
    padding: 18px 36px !important;
    background: linear-gradient(135deg, var(--rlpm-primary) 0%, var(--rlpm-primary-dark) 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 50px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    text-decoration: none !important;
    position: relative !important;
    box-shadow: 
        0 4px 0 #6a0f4f,
        0 6px 20px rgba(179, 21, 127, 0.3) !important;
    min-height: 56px !important;
}

/* Container wrapper for centering */
.rlpm-button-wrapper {
    display: block !important;
    width: 100% !important;
    padding: 10px 0 !important;
}

.rlpm-buy-button:hover,
.rlpm-sim-button:hover {
    transform: translateY(-4px) !important;
    box-shadow: 
        0 6px 0 #6a0f4f,
        0 10px 30px rgba(179, 21, 127, 0.4) !important;
    color: #ffffff !important;
}

.rlpm-buy-button:active,
.rlpm-sim-button:active {
    transform: translateY(2px) !important;
    box-shadow: 
        0 2px 0 #6a0f4f,
        0 4px 15px rgba(179, 21, 127, 0.3) !important;
}

.rlpm-buy-button *,
.rlpm-sim-button * {
    color: #ffffff !important;
}

.rlpm-btn-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.rlpm-buy-button:hover .rlpm-btn-icon,
.rlpm-sim-button:hover .rlpm-btn-icon {
    animation: rlpm-bounce 0.5s ease;
}

@keyframes rlpm-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Link Style Button */
.rlpm-buy-link {
    background: transparent;
    color: var(--rlpm-primary);
    padding: 8px 16px;
    text-decoration: underline;
}

.rlpm-buy-link:hover {
    color: var(--rlpm-primary-dark);
    box-shadow: none;
    transform: none;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

/* Tablets */
@media (max-width: 768px) {
    .rlpm-modal-container {
        max-width: 100%;
        margin: 12px;
    }
    
    .rlpm-modal-header {
        padding: 20px 20px 14px;
    }
    
    .rlpm-product-name {
        font-size: 18px;
    }
    
    .rlpm-type-options {
        padding: 12px;
    }
    
    .rlpm-type-header {
        padding: 14px;
    }
    
    .rlpm-type-icon {
        width: 46px;
        height: 46px;
        font-size: 24px;
        border-radius: 12px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .rlpm-modal {
        align-items: flex-end;
    }
    
    .rlpm-modal-container {
        margin: 0;
        max-height: 90vh;
    }
    
    .rlpm-modal-content {
        border-radius: var(--rlpm-radius) var(--rlpm-radius) 0 0;
        max-height: 90vh;
    }
    
    .rlpm-modal.active .rlpm-modal-container {
        transform: translateY(0);
    }
    
    .rlpm-modal-close {
        top: 8px;
        left: 8px;
    }
    
    .rlpm-modal-header {
        padding: 18px 16px 12px;
    }

    .rlpm-product-name {
        font-size: 17px;
    }
    
    .rlpm-quantity-row {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .rlpm-qty-btn {
        width: 36px;
        height: 36px;
    }
    
    #rlpm-quantity {
        width: 50px;
        height: 36px;
    }
    
    .rlpm-type-options {
        padding: 12px;
    }
    
    .rlpm-type-card {
        margin-bottom: 10px;
    }
    
    .rlpm-type-header {
        padding: 12px;
        gap: 10px;
    }
    
    .rlpm-type-icon {
        width: 42px;
        height: 42px;
        font-size: 22px;
        border-radius: 10px;
    }
    
    .rlpm-type-info h3 {
        font-size: 15px;
    }
    
    .rlpm-type-card:hover {
        transform: translateX(-2px);
    }
    
    .rlpm-type-info p {
        font-size: 12px;
    }
    
    .rlpm-type-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .rlpm-divider {
        margin: 16px 0;
    }
    
    .rlpm-divider span {
        font-size: 11px;
    }
    
    .rlpm-type-card.expanded .rlpm-type-body {
        padding: 12px;
    }
    
    .rlpm-phone-input {
        height: 44px;
        font-size: 16px;
        padding: 0 36px 0 14px;
    }
    
    .rlpm-add-btn {
        height: 48px;
        font-size: 16px;
    }
    
    .rlpm-buy-button,
    .rlpm-sim-button {
        padding: 16px 28px !important;
        font-size: 16px !important;
        max-width: none !important;
        width: 85% !important;
        min-height: 52px !important;
        box-shadow: 
            0 3px 0 #6a0f4f,
            0 5px 15px rgba(179, 21, 127, 0.25) !important;
    }
    
    .rlpm-toast,
    .rlpm-error-toast {
        bottom: 16px;
        padding: 12px 20px;
        font-size: 14px;
        max-width: calc(100% - 32px);
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .rlpm-product-name {
        font-size: 16px;
    }
    
    .rlpm-type-icon {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .rlpm-type-info h3 {
        font-size: 14px;
    }
    
    .rlpm-phone-input {
        font-size: 15px;
    }
}

/* Safe area for notched phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    @media (max-width: 480px) {
        .rlpm-modal-content {
            padding-bottom: env(safe-area-inset-bottom);
        }
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    /* Optional: Add dark mode styles here if needed */
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .rlpm-modal,
    .rlpm-modal-container,
    .rlpm-type-card,
    .rlpm-type-body,
    .rlpm-toast,
    .rlpm-error-toast,
    .rlpm-spinner {
        transition: none;
        animation: none;
    }
}

/* ============================================
   STEP INDICATOR
   ============================================ */
.rlpm-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    gap: 0;
    background: linear-gradient(180deg, #fdf4fb 0%, #fff 100%);
    border-bottom: 1px solid var(--rlpm-gray-100);
}

.rlpm-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    min-width: 60px;
}

.rlpm-step.active,
.rlpm-step.done {
    opacity: 1;
}

.rlpm-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--rlpm-gray-200);
    color: var(--rlpm-gray-500);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.rlpm-step.active .rlpm-step-num {
    background: white;
    color: var(--rlpm-primary);
    border-color: var(--rlpm-primary);
    box-shadow: 0 0 0 3px rgba(179,21,127,0.12);
}

.rlpm-step.done .rlpm-step-num {
    background: var(--rlpm-success);
    color: white;
    border-color: var(--rlpm-success);
}

.rlpm-step.done .rlpm-step-num::before {
    content: '✓';
}

.rlpm-step-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--rlpm-gray-400);
    letter-spacing: 0.3px;
}

.rlpm-step.active .rlpm-step-label {
    color: var(--rlpm-primary);
    font-weight: 700;
}

.rlpm-step.done .rlpm-step-label {
    color: var(--rlpm-success);
}

.rlpm-step-line {
    flex: 1;
    max-width: 50px;
    height: 2px;
    background: var(--rlpm-gray-200);
    margin: 0 6px 18px;
    border-radius: 1px;
}

/* ============================================
   INLINE DELIVERY OPTIONS (Physical SIM)
   ============================================ */

.rlpm-delivery-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.rlpm-delivery-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 2px solid var(--rlpm-gray-200);
    border-radius: 12px;
    cursor: pointer;
    background: white;
    transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
    position: relative;
}

.rlpm-delivery-option:hover {
    border-color: var(--rlpm-primary);
    background: #fdf4fb;
    transform: translateX(-3px);
}

.rlpm-delivery-option.selected {
    border-color: var(--rlpm-primary);
    background: linear-gradient(135deg, #fdf4fb 0%, #fce7f8 100%);
    box-shadow: 0 3px 12px rgba(179,21,127,0.15);
}

.rlpm-deliv-icon {
    font-size: 26px;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rlpm-gray-100);
    border-radius: 10px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.rlpm-delivery-option.selected .rlpm-deliv-icon {
    background: linear-gradient(135deg, var(--rlpm-primary), var(--rlpm-primary-dark));
}

.rlpm-deliv-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rlpm-deliv-info strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--rlpm-gray-800);
}

.rlpm-deliv-info span {
    font-size: 12px;
    color: var(--rlpm-gray-500);
}

.rlpm-deliv-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--rlpm-gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.rlpm-delivery-option.selected .rlpm-deliv-check {
    background: var(--rlpm-primary);
    border-color: var(--rlpm-primary);
    color: white;
}

/* ============================================
   UPSELL VIEW
   ============================================ */

#rlpm-view-upsell {
    padding: 0;
}

.rlpm-upsell-header {
    text-align: center;
    padding: 16px 20px 14px;
    background: linear-gradient(135deg, var(--rlpm-primary) 0%, #c8208e 100%);
    position: relative;
    overflow: hidden;
}

.rlpm-upsell-header::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.rlpm-upsell-header::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -10px;
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}

.rlpm-upsell-title {
    font-size: 17px;
    font-weight: 800;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    margin: 0;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.rlpm-upsell-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
    max-height: 320px;
    overflow-y: auto;
    padding: 14px 14px 0;
}

.rlpm-upsell-cards::-webkit-scrollbar { width: 5px; }
.rlpm-upsell-cards::-webkit-scrollbar-track { background: var(--rlpm-gray-100); border-radius: 3px; }
.rlpm-upsell-cards::-webkit-scrollbar-thumb { background: var(--rlpm-gray-300); border-radius: 3px; }

.rlpm-upsell-card {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border: 2px solid var(--rlpm-gray-200);
    border-radius: 12px;
    background: white;
    transition: all 0.2s ease;
}

.rlpm-upsell-card:hover {
    border-color: var(--rlpm-gray-300);
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.rlpm-upsell-card.has-qty {
    border-color: var(--rlpm-primary);
    background: #fdf4fb;
}

.rlpm-upsell-img {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--rlpm-gray-100);
    border: 1px solid var(--rlpm-gray-200);
    align-self: center;
}

.rlpm-upsell-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rlpm-upsell-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Top row: name + qty controls */
.rlpm-upsell-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.rlpm-upsell-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--rlpm-gray-900);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.rlpm-upsell-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--rlpm-primary);
}

.rlpm-upsell-price del {
    opacity: 0.45;
    font-size: 11px;
    font-weight: 400;
    margin-right: 3px;
}

.rlpm-upsell-toggle {
    display: inline-block;
    background: none;
    border: none;
    padding: 0;
    color: var(--rlpm-gray-400);
    font-size: 10px;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 1px;
    opacity: 0.7;
}

.rlpm-upsell-toggle:hover {
    color: var(--rlpm-primary);
    opacity: 1;
}

.rlpm-upsell-desc {
    display: none;
    margin-top: 6px;
}

.rlpm-upsell-desc.is-open {
    display: block;
}

.rlpm-upsell-desc-inner {
    max-height: 140px;
    overflow-y: auto;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--rlpm-gray-600);
    background: var(--rlpm-gray-50);
    border: 1px solid var(--rlpm-gray-200);
    border-radius: 6px;
}

/* Qty controls — pill style */
.rlpm-upsell-qty-row {
    display: flex;
    align-items: center;
    background: var(--rlpm-gray-100);
    border-radius: 20px;
    padding: 3px;
    gap: 0;
    flex-shrink: 0;
    border: 1.5px solid var(--rlpm-gray-200);
}

.rlpm-upsell-qty-minus,
.rlpm-upsell-qty-plus {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
    color: var(--rlpm-gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
    padding: 0;
}

.rlpm-upsell-qty-minus:hover {
    background: white;
    color: var(--rlpm-error);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.rlpm-upsell-qty-plus:hover {
    background: var(--rlpm-primary);
    color: white;
    box-shadow: 0 1px 6px rgba(179,21,127,0.35);
}

.rlpm-upsell-card.has-qty .rlpm-upsell-qty-plus {
    background: var(--rlpm-primary);
    color: white;
}

.rlpm-upsell-qty-val {
    min-width: 24px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--rlpm-gray-800);
    padding: 0 2px;
}

.rlpm-upsell-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 14px 14px;
    background: white;
    border-top: 1px solid var(--rlpm-gray-100);
    margin-top: 12px;
}

.rlpm-upsell-back-btn {
    flex-shrink: 0;
    padding: 0 16px;
    height: 50px;
    border: 2px solid var(--rlpm-gray-200);
    border-radius: 12px;
    background: white;
    color: var(--rlpm-gray-600);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.rlpm-upsell-back-btn:hover {
    border-color: var(--rlpm-gray-400);
    color: var(--rlpm-gray-800);
}

.rlpm-upsell-submit-btn {
    flex: 1;
    height: 50px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--rlpm-primary) 0%, var(--rlpm-primary-dark) 100%);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 4px 14px rgba(179,21,127,0.35);
}

#rlpm-order-modal .rlpm-upsell-submit-btn,
#rlpm-order-modal .rlpm-upsell-submit-btn:link,
#rlpm-order-modal .rlpm-upsell-submit-btn:visited,
#rlpm-order-modal .rlpm-upsell-submit-btn:hover,
#rlpm-order-modal .rlpm-upsell-submit-btn:active {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background-image: linear-gradient(135deg, var(--rlpm-primary) 0%, var(--rlpm-primary-dark) 100%) !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5) !important;
}

.rlpm-upsell-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(179,21,127,0.45);
}

.rlpm-upsell-submit-btn:active {
    transform: translateY(0);
}

/* Qty badge on selected upsell card */
.rlpm-upsell-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--rlpm-primary);
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-size: 11px;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 6px rgba(179,21,127,0.4);
    border: 2px solid white;
    pointer-events: none;
}

.rlpm-upsell-card {
    position: relative;
}

/* Type body max-height for physical (delivery options) */
.rlpm-type-card[data-type="physical"].expanded .rlpm-type-body {
    max-height: 400px;
}

/* Physical SIM continue button */
.rlpm-physical-continue {
    width: 100%;
    height: 48px;
    border: none;
    background: linear-gradient(135deg, var(--rlpm-primary) 0%, var(--rlpm-primary-dark) 100%);
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 4px 14px rgba(179,21,127,0.35);
    margin-top: 4px;
}

#rlpm-order-modal .rlpm-physical-continue,
#rlpm-order-modal .rlpm-physical-continue:hover,
#rlpm-order-modal .rlpm-physical-continue:active {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background-image: linear-gradient(135deg, var(--rlpm-primary) 0%, var(--rlpm-primary-dark) 100%) !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4) !important;
}

.rlpm-physical-continue:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(179,21,127,0.45);
}

.rlpm-physical-continue:active {
    transform: translateY(0);
}

/* Print styles */
@media print {
    .rlpm-modal {
        display: none !important;
    }
}

