/* Overlay */
#wtrk-exit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 25, 54, 0.45);
    backdrop-filter: blur(4px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#wtrk-exit-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Popup */
#wtrk-exit-popup {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #ffffff;
    border: 1px solid #d9e1f1;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(17, 25, 54, 0.25);
    z-index: 99999;
    max-width: 440px;
    width: 92%;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
}
#wtrk-exit-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Header */
.wtrk-exit-header {
    background: linear-gradient(120deg, #4f7cff, #3d5ff5);
    color: #fff;
    padding: 28px 24px;
    text-align: center;
}
.wtrk-exit-header h2 {
    margin: 20px 0 8px;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff !important;
}
.wtrk-exit-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 15px;
    color: #ffffff !important;
}

/* Body */
.wtrk-exit-body {
    padding: 28px 24px;
}

/* Benefits */
.wtrk-exit-benefits {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}
.wtrk-exit-benefit {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #111936;
}
.wtrk-exit-benefit svg {
    flex-shrink: 0;
    color: #29d3a3;
}

/* Form */
.wtrk-exit-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.wtrk-exit-form input[type="email"],
.wtrk-exit-form input[type="url"],
.wtrk-exit-form input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d9e1f1;
    border-radius: 12px;
    font-size: 16px;
    color: #111936;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
.wtrk-exit-form input[type="email"]:focus,
.wtrk-exit-form input[type="url"]:focus,
.wtrk-exit-form input[type="text"]:focus {
    outline: none;
    border-color: #4f7cff;
    box-shadow: 0 0 0 3px rgba(79,124,255,0.15);
}

.wtrk-exit-platform-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5f6b8a;
    margin-bottom: 8px;
}
.wtrk-exit-platform-seg {
    display: flex;
    background: #f1f5f9;
    border: 1px solid #d9e1f1;
    border-radius: 12px;
    padding: 3px;
    gap: 3px;
}
.wtrk-exit-platform-seg label {
    flex: 1;
    margin: 0;
    cursor: pointer;
}
.wtrk-exit-platform-seg input {
    display: none;
}
.wtrk-exit-platform-seg span.wtrk-exit-platform-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    border-radius: 10px;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.wtrk-exit-platform-seg input:checked + span.wtrk-exit-platform-option {
    background: #fff;
    color: #1e3a8a;
    box-shadow: 0 1px 4px rgba(17, 25, 54, 0.1);
}
.wtrk-exit-platform-icon {
    width: 50px;
    height: 30px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.wtrk-exit-consent {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: #5f6b8a;
    text-align: center;
}
.wtrk-exit-consent a {
    color: #3d5ff5;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.wtrk-exit-consent a:hover {
    color: #4f7cff;
}

.wtrk-exit-form button {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(120deg, #4f7cff, #3d5ff5);
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}
.wtrk-exit-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79,124,255,0.35);
}
.wtrk-exit-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Footer note */
.wtrk-exit-note {
    text-align: center;
    margin-top: 16px;
    font-size: 12px;
    color: #5f6b8a;
}

/* Close button */
.wtrk-exit-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255,255,255,0.28);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
}
.wtrk-exit-close:hover {
    background: rgba(255,255,255,0.42);
}
.wtrk-exit-close svg {
    color: #fff;
}

/* Success state */
.wtrk-exit-success {
    text-align: center;
    padding: 20px 0;
}
.wtrk-exit-success svg {
    color: #29d3a3;
    margin-bottom: 16px;
}
.wtrk-exit-success h3 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #111936;
}
.wtrk-exit-success p {
    margin: 0;
    color: #5f6b8a;
    font-size: 14px;
}

/* Error */
.wtrk-exit-error {
    background: #fff1f1;
    color: #8b1c1c;
    border: 1px solid #ffd7d7;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
    display: none;
}
.wtrk-exit-error.show {
    display: block;
}

/* Download button */
.wtrk-exit-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding: 14px 24px;
    background: linear-gradient(120deg, #4f7cff, #3d5ff5);
    color: #fff !important;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}
.wtrk-exit-download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79,124,255,0.35);
}
.wtrk-exit-download-btn svg {
    flex-shrink: 0;
    display: inline-block;
}
