/*
 * SEO Audit Tool — CTA Widget + Fullscreen Loading Styles
 * Apple Glass UI: frosted glass, light backgrounds, subtle shadows
 */

/* ═══════════════════════════════════════════════════════════════════════════
   CTA WIDGET
   ═══════════════════════════════════════════════════════════════════════════ */

.sat-cta-wrapper {
    box-sizing: border-box;
    padding: 2.5rem 2rem;
    text-align: center;
}

.sat-cta-heading {
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1d1d1f;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.sat-cta-form {
    display: flex;
    flex-wrap: nowrap;
    gap: 0px;
    justify-content: center;
    align-items: center;
}

.sat-cta-form input[type="url"] {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 480px;
    padding: 14px 20px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 30px;
    border-top-right-radius: 0px;
    border-bottom-right-radius: 0px;
    font-size: 1rem;
    outline: none;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #1d1d1f;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.sat-cta-form input[type="url"]::placeholder {
    color: #86868b;
}

.sat-cta-form input[type="url"]:focus {
    border-color: rgba(0,0,0,0.12);
    box-shadow: none;
}

.sat-cta-form .sat-cta-button {
    padding: 14px 36px !important;
    background: #1d1d1f !important;
    color: #fff !important;
    border: none !important;
    border-radius: 30px !important;
    border-bottom-left-radius: 0px !important;
    border-top-left-radius: 0px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.sat-cta-form .sat-cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    background: #333 !important;
    color: #fff !important;
}

.sat-cta-message {
    margin-top: 0.75rem;
    min-height: 1.5em;
    font-size: 0.9rem;
    color: #ff3b30;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FULLSCREEN LOADING OVERLAY — Apple Glass UI
   ═══════════════════════════════════════════════════════════════════════════ */

.sat-fullscreen-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    background: rgb(245 245 247 / 0.53%);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: sat-fadeIn 0.4s ease;
}

@keyframes sat-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.sat-loading-content {
    text-align: center;
    width: 60%;
    padding: 48px 32px;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 24px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.06);
}

.sat-loading-logo {
    margin-bottom: 28px;
}

.sat-loading-title {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 10px 0;
}

.sat-loading-url {
    font-size: 14px;
    color: #86868b;
    margin: 0 0 32px 0;
    word-break: break-all;
}

/* Progress bar */
.sat-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.sat-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(0,0,0,0.06);
    border-radius: 3px;
    overflow: hidden;
}

.sat-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(100deg, #1D77D5 0%, #43B1A2 50%, #64BC5F 100%);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.sat-progress-pct {
    font-size: 14px;
    font-weight: 600;
    color: #43B1A2;
    min-width: 40px;
    text-align: right;
}

/* Stage row */
.sat-stage-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 32px;
    transition: opacity 0.3s ease;
    min-height: 28px;
}

.sat-stage-icon {
    font-size: 20px;
}

.sat-stage-text {
    font-size: 15px;
    color: #86868b;
}

.sat-loading-note {
    font-size: 13px;
    color: #86868b;
    margin: 0;
}

/* Email fallback inside overlay */
.sat-fullscreen-loading .sat-email-fallback-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: 8px;
}

.sat-fullscreen-loading .sat-email-fallback-form input[type="email"] {
    flex: 1 1 240px;
    max-width: 320px;
    padding: 12px 20px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #1d1d1f;
    outline: none;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}

.sat-fullscreen-loading .sat-email-fallback-form input[type="email"]::placeholder {
    color: #86868b;
}

.sat-fullscreen-loading .sat-email-fallback-form input[type="email"]:focus {
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0,113,227,0.12);
}

.sat-fullscreen-loading .sat-cta-button {
    padding: 12px 32px;
}

.sat-fullscreen-loading .sat-loading-note strong {
    color: #0071e3;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LEGACY: inline loading (kept for backward compat if overlay fails)
   ═══════════════════════════════════════════════════════════════════════════ */

.sat-loading {
    text-align: center;
    padding: 2rem;
}

.sat-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(0,0,0,0.06);
    border-top-color: #0071e3;
    border-radius: 50%;
    animation: sat-spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes sat-spin {
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESULTS / GAPS (legacy inline)
   ═══════════════════════════════════════════════════════════════════════════ */

.sat-results {
    text-align: left;
    padding: 1rem 0;
}

.sat-results h2 {
    margin-bottom: 0.5rem;
}

.sat-gaps-list {
    margin-top: 1rem;
}

.sat-gap-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.sat-gap-item:last-child {
    border-bottom: none;
}

.sat-gap-keyword {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #1d1d1f;
}

.sat-competitors-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.sat-competitors-table th,
.sat-competitors-table td {
    padding: 0.4rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.sat-competitors-table th {
    font-weight: 600;
    background-color: rgba(0,0,0,0.02);
}

/* ═══════════════════════════════════════════════════════════════════════════
   EMAIL FALLBACK (legacy inline)
   ═══════════════════════════════════════════════════════════════════════════ */

.sat-email-fallback {
    text-align: center;
    padding: 2rem;
}

.sat-email-fallback p {
    margin-bottom: 1rem;
    color: #86868b;
}

.sat-email-fallback-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.sat-email-fallback-form input[type="email"] {
    flex: 1 1 240px;
    max-width: 360px;
    padding: 0.6rem 1rem;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 12px;
    font-size: 1rem;
}

.sat-error {
    color: #ff3b30;
    padding: 1rem 0;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SMOKE OVERLAY — Add class "sat-smoke" to any Elementor container
   ═══════════════════════════════════════════════════════════════════════════ */

.e-con.sat-smoke,
.elementor-element.sat-smoke,
.sat-smoke {
    position: relative !important;
}

.e-con.sat-smoke > .sat-smoke-layer,
.elementor-element.sat-smoke > .sat-smoke-layer,
.sat-smoke > .sat-smoke-layer {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 1 !important;
    display: block !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    overflow: hidden !important;
}

.sat-smoke > .sat-smoke-layer > .sat-puff {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.35) 35%, rgba(255,255,255,0.1) 60%, transparent 75%);
    filter: url(#sat-smoke-filter);
}

/* Puffs originate from rocket exhaust area (bottom-center-right), drift left & up with turbulent motion */
.sat-puff-1  { width: 200px; height: 160px; bottom: 0%;   right: 25%; animation: satPuff1 14s linear infinite; }
.sat-puff-2  { width: 250px; height: 180px; bottom: -5%;  right: 22%; animation: satPuff2 18s linear infinite; animation-delay: -2s; }
.sat-puff-3  { width: 170px; height: 130px; bottom: 5%;   right: 28%; animation: satPuff3 16s linear infinite; animation-delay: -5s; }
.sat-puff-4  { width: 290px; height: 210px; bottom: -10%; right: 20%; animation: satPuff4 20s linear infinite; animation-delay: -8s; }
.sat-puff-5  { width: 160px; height: 120px; bottom: 3%;   right: 30%; animation: satPuff5 13s linear infinite; animation-delay: -3.5s; }
.sat-puff-6  { width: 230px; height: 170px; bottom: -3%;  right: 26%; animation: satPuff6 17s linear infinite; animation-delay: -10s; }
.sat-puff-7  { width: 190px; height: 140px; bottom: 8%;   right: 24%; animation: satPuff7 15s linear infinite; animation-delay: -6.5s; }
.sat-puff-8  { width: 240px; height: 180px; bottom: -7%;  right: 27%; animation: satPuff8 19s linear infinite; animation-delay: -12s; }
.sat-puff-9  { width: 220px; height: 160px; bottom: 2%;   right: 23%; animation: satPuff1 16s linear infinite; animation-delay: -7s; }
.sat-puff-10 { width: 180px; height: 140px; bottom: -2%;  right: 26%; animation: satPuff3 13s linear infinite; animation-delay: -1s; }
.sat-puff-11 { width: 260px; height: 190px; bottom: -8%;  right: 21%; animation: satPuff5 19s linear infinite; animation-delay: -9s; }
.sat-puff-12 { width: 200px; height: 150px; bottom: 6%;   right: 29%; animation: satPuff7 15s linear infinite; animation-delay: -4s; }
.sat-puff-13 { width: 170px; height: 130px; bottom: -4%;  right: 24%; animation: satPuff2 17s linear infinite; animation-delay: -11s; }
.sat-puff-14 { width: 240px; height: 170px; bottom: 1%;   right: 27%; animation: satPuff6 14s linear infinite; animation-delay: -6s; }

@keyframes satPuff1 {
    0%   { transform: translate(0, 0) scale(0.4) rotate(0deg); opacity: 0; }
    5%   { opacity: 0.55; }
    15%  { transform: translate(-100px, -20px) scale(0.7) rotate(8deg); opacity: 0.6; }
    30%  { transform: translate(-200px, -55px) scale(0.95) rotate(-5deg); opacity: 0.5; }
    45%  { transform: translate(-320px, -70px) scale(1.15) rotate(12deg); opacity: 0.35; }
    60%  { transform: translate(-420px, -100px) scale(1.3) rotate(-8deg); opacity: 0.2; }
    80%  { transform: translate(-520px, -120px) scale(1.5) rotate(6deg); opacity: 0.08; }
    100% { transform: translate(-600px, -140px) scale(1.7) rotate(-3deg); opacity: 0; }
}
@keyframes satPuff2 {
    0%   { transform: translate(0, 0) scale(0.35) rotate(0deg); opacity: 0; }
    6%   { opacity: 0.5; }
    18%  { transform: translate(-90px, -30px) scale(0.75) rotate(-6deg); opacity: 0.55; }
    32%  { transform: translate(-220px, -45px) scale(1) rotate(10deg); opacity: 0.45; }
    48%  { transform: translate(-350px, -80px) scale(1.2) rotate(-12deg); opacity: 0.3; }
    65%  { transform: translate(-460px, -110px) scale(1.4) rotate(5deg); opacity: 0.15; }
    85%  { transform: translate(-560px, -135px) scale(1.6) rotate(-7deg); opacity: 0.05; }
    100% { transform: translate(-650px, -155px) scale(1.8) rotate(4deg); opacity: 0; }
}
@keyframes satPuff3 {
    0%   { transform: translate(0, 0) scale(0.5) rotate(0deg); opacity: 0; }
    7%   { opacity: 0.6; }
    20%  { transform: translate(-110px, -15px) scale(0.8) rotate(6deg); opacity: 0.55; }
    35%  { transform: translate(-230px, -50px) scale(1.05) rotate(-10deg); opacity: 0.4; }
    52%  { transform: translate(-350px, -65px) scale(1.2) rotate(8deg); opacity: 0.3; }
    70%  { transform: translate(-450px, -95px) scale(1.35) rotate(-4deg); opacity: 0.15; }
    88%  { transform: translate(-530px, -115px) scale(1.5) rotate(10deg); opacity: 0.05; }
    100% { transform: translate(-580px, -130px) scale(1.6) rotate(-6deg); opacity: 0; }
}
@keyframes satPuff4 {
    0%   { transform: translate(0, 0) scale(0.3) rotate(0deg); opacity: 0; }
    4%   { opacity: 0.45; }
    16%  { transform: translate(-80px, -25px) scale(0.65) rotate(-8deg); opacity: 0.5; }
    30%  { transform: translate(-200px, -60px) scale(0.9) rotate(14deg); opacity: 0.4; }
    46%  { transform: translate(-330px, -85px) scale(1.15) rotate(-6deg); opacity: 0.3; }
    62%  { transform: translate(-440px, -105px) scale(1.35) rotate(9deg); opacity: 0.18; }
    80%  { transform: translate(-550px, -130px) scale(1.55) rotate(-10deg); opacity: 0.06; }
    100% { transform: translate(-640px, -150px) scale(1.75) rotate(5deg); opacity: 0; }
}
@keyframes satPuff5 {
    0%   { transform: translate(0, 0) scale(0.45) rotate(0deg); opacity: 0; }
    8%   { opacity: 0.6; }
    22%  { transform: translate(-120px, -18px) scale(0.8) rotate(7deg); opacity: 0.5; }
    38%  { transform: translate(-250px, -48px) scale(1) rotate(-9deg); opacity: 0.4; }
    55%  { transform: translate(-370px, -72px) scale(1.15) rotate(11deg); opacity: 0.25; }
    75%  { transform: translate(-480px, -100px) scale(1.35) rotate(-5deg); opacity: 0.1; }
    100% { transform: translate(-570px, -125px) scale(1.55) rotate(8deg); opacity: 0; }
}
@keyframes satPuff6 {
    0%   { transform: translate(0, 0) scale(0.4) rotate(0deg); opacity: 0; }
    5%   { opacity: 0.5; }
    17%  { transform: translate(-95px, -28px) scale(0.7) rotate(-7deg); opacity: 0.55; }
    33%  { transform: translate(-210px, -55px) scale(0.95) rotate(12deg); opacity: 0.4; }
    50%  { transform: translate(-340px, -78px) scale(1.15) rotate(-9deg); opacity: 0.28; }
    68%  { transform: translate(-450px, -108px) scale(1.35) rotate(6deg); opacity: 0.12; }
    86%  { transform: translate(-550px, -128px) scale(1.5) rotate(-11deg); opacity: 0.04; }
    100% { transform: translate(-620px, -142px) scale(1.65) rotate(3deg); opacity: 0; }
}
@keyframes satPuff7 {
    0%   { transform: translate(0, 0) scale(0.5) rotate(0deg); opacity: 0; }
    6%   { opacity: 0.55; }
    19%  { transform: translate(-105px, -22px) scale(0.75) rotate(9deg); opacity: 0.5; }
    36%  { transform: translate(-240px, -52px) scale(1) rotate(-7deg); opacity: 0.38; }
    54%  { transform: translate(-360px, -75px) scale(1.2) rotate(13deg); opacity: 0.22; }
    73%  { transform: translate(-470px, -102px) scale(1.4) rotate(-8deg); opacity: 0.08; }
    100% { transform: translate(-580px, -132px) scale(1.6) rotate(5deg); opacity: 0; }
}
@keyframes satPuff8 {
    0%   { transform: translate(0, 0) scale(0.35) rotate(0deg); opacity: 0; }
    7%   { opacity: 0.48; }
    20%  { transform: translate(-85px, -32px) scale(0.7) rotate(-10deg); opacity: 0.52; }
    37%  { transform: translate(-210px, -58px) scale(0.95) rotate(8deg); opacity: 0.38; }
    53%  { transform: translate(-340px, -82px) scale(1.15) rotate(-13deg); opacity: 0.25; }
    70%  { transform: translate(-460px, -112px) scale(1.4) rotate(7deg); opacity: 0.1; }
    90%  { transform: translate(-560px, -138px) scale(1.6) rotate(-5deg); opacity: 0.03; }
    100% { transform: translate(-640px, -148px) scale(1.75) rotate(9deg); opacity: 0; }
}

.sat-smoke > *:not(.sat-smoke-layer) {
    position: relative;
    z-index: 2;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SHOOTING STAR — Add class "sat-shooting-star" to any Elementor container
   ═══════════════════════════════════════════════════════════════════════════ */

.e-con.sat-shooting-star,
.elementor-element.sat-shooting-star,
.sat-shooting-star {
    position: relative !important;
    overflow: hidden !important;
}

.sat-shooting-star > .sat-star-layer {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 1 !important;
    display: block !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    overflow: hidden !important;
}

.sat-shooting-star > *:not(.sat-star-layer) {
    position: relative;
    z-index: 2;
}

.sat-star {
    position: absolute;
    top: 8%;
    left: -5%;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 6px 2px rgba(255,255,255,0.8), 0 0 12px 4px rgba(255,255,255,0.4);
    opacity: 0;
    animation: satShootingStar 8s linear infinite;
}

.sat-star::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(to left, rgba(255,255,255,0.8), rgba(255,255,255,0.3) 30%, transparent);
    border-radius: 1px;
}

.sat-star-2, .sat-star-3 { display: none; }

@keyframes satShootingStar {
    0%   { left: -5%; top: 8%; opacity: 0; transform: scale(0.5); }
    3%   { opacity: 1; transform: scale(1); }
    20%  { opacity: 0.9; }
    35%  { opacity: 0.4; transform: scale(0.6); }
    45%  { opacity: 0; }
    50%  { left: 85%; top: 50%; opacity: 0; transform: scale(0.2); }
    100% { left: 85%; top: 50%; opacity: 0; transform: scale(0.2); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .sat-loading-title {
        font-size: 22px;
    }
    .sat-loading-content {
        padding: 28px 20px;
    }
    .sat-cta-form {
        flex-wrap: wrap;
        gap: 10px;
    }
    .sat-cta-form input[type="url"] {
        width: 100%;
        max-width: none;
        flex: 1 1 100%;
        border-radius: 30px !important;
        border-top-right-radius: 30px !important;
        border-bottom-right-radius: 30px !important;
    }
    .sat-cta-form .sat-cta-button {
        width: 100%;
        max-width: none;
        border-radius: 30px !important;
        border-bottom-left-radius: 30px !important;
        border-top-left-radius: 30px !important;
    }
}
