.ysleadgen-popup {
    position: fixed !important;
    z-index: 999999 !important;
    display: none;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ysleadgen-popup[data-position="center"] {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: none;
    overflow: visible;
    transform-origin: center center;
}

.ysleadgen-popup[data-position="bottom-right"] {
    bottom: 20px;
    right: 20px;
    top: auto;
    left: auto;
    max-height: calc(100vh - 40px) !important;
    overflow-y: auto !important;
}

.ysleadgen-popup[data-position="bottom-left"] {
    bottom: 20px;
    left: 20px;
    top: auto;
    right: auto;
    max-height: calc(100vh - 40px) !important;
    overflow-y: auto !important;
}

.ysleadgen-popup[data-position="top-right"] {
    top: 20px;
    right: 20px;
    bottom: auto;
    left: auto;
    max-height: calc(100vh - 40px) !important;
    overflow-y: auto !important;
}

.ysleadgen-popup[data-position="top-left"] {
    top: 20px;
    left: 20px;
    bottom: auto;
    right: auto;
    max-height: calc(100vh - 40px) !important;
    overflow-y: auto !important;
}

.ysleadgen-popup[data-position="top"] {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-height: calc(100vh - 40px) !important;
    overflow-y: auto !important;
}

.ysleadgen-popup[data-position="bottom"] {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-height: calc(100vh - 40px) !important;
    overflow-y: auto !important;
}

/* Full Screen Popups */
.ysleadgen-popup.ysleadgen-fullscreen,
.ysleadgen-popup.ysleadgen-fullscreen .ysleadgen-overlay-wrapper,
.ysleadgen-popup.ysleadgen-fullscreen .ysleadgen-content,
.ysleadgen-popup.ysleadgen-fullscreen .yslg-page,
.ysleadgen-popup.ysleadgen-fullscreen .fs-container {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    transform: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

html.ysleadgen-popup-active,
body.ysleadgen-popup-active {
    overflow: hidden !important;
    height: 100% !important;
}





.ysleadgen-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.7) !important;
    z-index: 999998 !important;
    display: none;
}

.ysleadgen-close {
    position: absolute !important;
    top: 25px !important;
    right: 10px !important;
    width: 32px !important;
    height: 32px !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-radius: 50% !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    cursor: pointer !important;
    font-size: 20px !important;
    font-weight: bold !important;
    line-height: 1 !important;
    z-index: 10000 !important;
    color: #000000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.ysleadgen-popup .yslg-page,
.ysleadgen-popup .ysi-popup,
.ysleadgen-popup .ysleadgen-content {
    position: relative !important;
}

/* Global Isolated Close Button Rules */
.ysleadgen-popup .ysi-close-btn,
.ysleadgen-popup .close-btn,
.ysleadgen-popup .ysleadgen-close,
.ysleadgen-popup .ysi-close-btn-circle,
.ysleadgen-popup .close-button,
.ysleadgen-popup .close-icon,
.ysleadgen-popup [data-gjs-type="close-button"],
.ysi-close-btn,
.close-btn,
.ysleadgen-close,
.ysi-close-btn-circle,
.close-button,
.close-icon,
[data-gjs-type="close-button"] {
    position: absolute !important;
    top: 25px !important;
    right: 10px !important;
    left: auto !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    font-size: 20px !important;
    font-weight: bold !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 10000 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    transition: transform 0.15s ease, opacity 0.15s ease !important;
}

.ysi-close-btn *,
.close-btn *,
.ysleadgen-close *,
.ysi-close-btn-circle *,
.close-button *,
.close-icon *,
[data-gjs-type="close-button"] * {
    color: #000000 !important;
    fill: #000000 !important;
    stroke: #000000 !important;
}

.ysi-close-btn:hover,
.close-btn:hover,
.ysleadgen-close:hover,
.ysi-close-btn-circle:hover,
.close-button:hover,
.close-icon:hover,
[data-gjs-type="close-button"]:hover {
    opacity: 0.9 !important;
    transform: scale(1.08) !important;
}

/* Conversational Forms UI (Live Storefront) */
.ysleadgen-form[data-is-conversational="true"] .conversational-wrapper {
    position: relative;
    overflow: visible;
}

.conversational-step {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.conversational-step.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.ysleadgen-form[data-is-conversational="true"] .conversational-step label {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: block;
    color: inherit;
}

.ysleadgen-form[data-is-conversational="true"] .conversational-step input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.ysleadgen-form[data-is-conversational="true"] .conversational-step textarea,
.ysleadgen-form[data-is-conversational="true"] .conversational-step select {
    font-size: 1.1rem;
    padding: 14px 16px;
    border-radius: 8px;
    width: 100%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    transition: border-color 0.2s;
}

.ysleadgen-form[data-is-conversational="true"] .conversational-step input:focus,
.ysleadgen-form[data-is-conversational="true"] .conversational-step textarea:focus {
    border-color: #3b82f6;
    outline: none;
}

.conversational-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.conversational-btn {
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, transform 0.1s;
}

.conversational-btn:hover {
    background: #2563eb;
}

.conversational-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.conversational-btn-back {
    background: #f3f4f6;
    color: #4b5563;
}

.conversational-btn-back:hover {
    background: #e5e7eb;
}

.conversational-progress-container {
    flex: 1;
    margin: 0 20px;
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.conversational-progress-bar {
    height: 100%;
    background: #3b82f6;
    width: 0%;
    transition: width 0.3s ease;
}

.conversational-error {
    color: #ff4d4f !important;
    background: rgba(255, 77, 79, 0.15) !important;
    border: 1px solid rgba(255, 77, 79, 0.4) !important;
    border-radius: 6px !important;
    padding: 10px 14px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    margin-top: 12px !important;
    margin-bottom: 12px !important;
    display: none;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: left !important;
    z-index: 999 !important;
}