/* WIM Styles v1.6.0 */
.wim-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wim-modal.open {
    display: flex !important;
    opacity: 1;
    justify-content: center;
    align-items: center;
}

.wim-modal-content {
    background-color: #fff;
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    position: relative;
    animation: wimSlideIn 0.3s ease;
    font-family: 'Inter', system-ui, sans-serif;
}

@keyframes wimSlideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.wim-close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    z-index: 10;
}

.wim-close-modal:hover {
    color: #000;
}

.wim-container {
    padding: 30px;
}

.wim-section-title {
    text-align: center;
    margin-bottom: 25px;
}

.wim-badge {
    background: #e0f2fe;
    color: #0284c7;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wim-section-title h2 {
    margin-top: 10px;
    font-size: 24px;
    color: #111827;
}

/* Progress */
.wim-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.wim-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
    transform: translateY(-50%);
}

.wim-step-indicator {
    width: 35px;
    height: 35px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #6b7280;
    position: relative;
    z-index: 1;
    cursor: pointer;
    transition: all 0.2s;
}

.wim-step-indicator.active {
    border-color: #2563eb;
    color: #2563eb;
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.wim-step-indicator.completed {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

/* Form Grids */
.wim-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.wim-grid-3 {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
}

@media(max-width: 640px) {

    .wim-grid-2,
    .wim-grid-3 {
        grid-template-columns: 1fr;
    }
}

.wim-field {
    margin-bottom: 15px;
}

.wim-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.wim-field input,
.wim-field select,
.wim-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.wim-field input:focus,
.wim-field select:focus,
.wim-field textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Steps */
.wim-step {
    display: none;
    /* JS toggles !important */
}

.wim-step.active {
    animation: wimFadeIn 0.3s ease;
}

@keyframes wimFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Cards & Subs */
.wim-sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.wim-sub-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    display: block;
}

.wim-sub-card:hover {
    border-color: #9ca3af;
}

.wim-sub-card.selected-card {
    border-color: #2563eb;
    background-color: #eff6ff;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.1);
}

.wim-sub-card input {
    position: absolute;
    opacity: 0;
}

.wim-sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.wim-sub-title {
    font-weight: 600;
    color: #111827;
}

.wim-discount {
    background: #dcfce7;
    color: #166534;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}

.wim-sub-desc {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

/* Custom Section */
.wim-custom-section {
    margin-top: 15px;
    padding: 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    animation: wimFadeIn 0.3s ease;
}

/* Screening */
.wim-screening-box {
    background: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.wim-checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #7f1d1d;
    cursor: pointer;
}

.wim-checkbox-item input {
    margin-top: 3px;
}

/* Signature */
.wim-signature-wrapper {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    height: 120px;
    position: relative;
    background: #fff;
}

canvas {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.wim-clear-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
}

/* Stripe */
.wim-stripe-container {
    padding: 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    margin-bottom: 20px;
}

/* Buttons */
.wim-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
}

.wim-btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    font-size: 15px;
    transition: all 0.2s;
}

.wim-btn-prev {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.wim-btn-prev:hover {
    background: #f9fafb;
}

.wim-btn-primary,
.wim-btn-default {
    background: #2563eb;
    color: #fff;
}

.wim-btn-primary:hover,
.wim-btn-default:hover {
    background: #1d4ed8;
}

/* Invoice & Live Pricing */
.wim-live-total {
    margin-top: 5px;
    font-size: 0.85em;
    color: #666;
    font-weight: 500;
}

.wim-live-total span {
    color: #2c3338;
    font-weight: 700;
}

.wim-invoice-container {
    background: #f8f9fa;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.wim-inv-title {
    margin: 0 0 12px 0;
    font-size: 1.1em;
    border-bottom: 2px solid #eaecf0;
    padding-bottom: 8px;
    color: #1d2327;
}

.wim-inv-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.95em;
    color: #50575e;
}

.wim-inv-row strong {
    color: #2c3338;
}

.wim-inv-discount {
    color: #008a20;
}

.wim-inv-discount strong {
    color: #008a20;
}

.wim-inv-total-row {
    border-top: 2px solid #eaecf0;
    padding-top: 10px;
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    font-size: 1.2em;
    font-weight: 700;
    color: #135e96;
}