/* Zygonich Lead Generation System - Conversion UI */

/* =============================================
   DESKTOP FLOATING CTAs
   ============================================= */

.zyg-floating-ctas {
    position: fixed;
    right: 24px;
    bottom: 32px;
    z-index: 9990;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

/* Slide-in entrance animation */
.zyg-floating-ctas {
    animation: zygSlideIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.8s;
}

@keyframes zygSlideIn {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

.zyg-float-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    color: #fff;
    overflow: hidden;
    white-space: nowrap;
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.22s ease,
                filter 0.22s ease;
}

/* Glossy inner highlight */
.zyg-float-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 55%);
    border-radius: inherit;
    pointer-events: none;
}

/* Ripple layer on click */
.zyg-float-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.15);
    border-radius: inherit;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s, transform 0.3s;
}

.zyg-float-btn:active::after {
    opacity: 1;
    transform: scale(1);
    transition: none;
}

.zyg-float-btn:hover {
    transform: translateY(-3px) scale(1.04);
    filter: brightness(1.08);
}

.zyg-float-btn:active {
    transform: translateY(0) scale(0.97);
}

/* Icon circle inside button */
.zyg-float-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

/* Individual button colours + shadows */
.zyg-btn-whatsapp {
    background: linear-gradient(135deg, var(--whatsapp, #22c55e) 0%, var(--whatsapp-deep, #16a34a) 100%);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.32),
                0 2px 6px rgba(0, 0, 0, 0.25);
}

.zyg-btn-call {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(165, 180, 252, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.zyg-btn-quote {
    background: var(--gradient-brand, linear-gradient(135deg, #8b5cf6, #6366f1));
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.38),
                0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Pulse rings */
.zyg-float-btn.zyg-pulse {
    animation: zygBtnPulse 2.6s ease-in-out infinite;
}

@keyframes zygBtnPulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(99, 102, 241, 0.38), 0 2px 6px rgba(0,0,0,0.25), 0 0 0 0 rgba(139, 92, 246, 0.5); }
    50%       { box-shadow: 0 8px 24px rgba(99, 102, 241, 0.38), 0 2px 6px rgba(0,0,0,0.25), 0 0 0 14px rgba(139, 92, 246, 0); }
}

.zyg-btn-whatsapp.zyg-pulse {
    animation: zygBtnPulseWa 2.6s ease-in-out infinite;
    animation-delay: 1.3s;
}

@keyframes zygBtnPulseWa {
    0%, 100% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.38), 0 2px 6px rgba(0,0,0,0.25), 0 0 0 0 rgba(37, 211, 102, 0.55); }
    50%       { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.38), 0 2px 6px rgba(0,0,0,0.25), 0 0 0 14px rgba(37, 211, 102, 0); }
}

/* =============================================
   MOBILE STICKY BOTTOM BAR
   ============================================= */

.zyg-mobile-cta-bar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9995;
    background: rgba(10, 10, 15, 0.96);
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    padding: 10px 10px max(12px, env(safe-area-inset-bottom));
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.55),
                0 -1px 0 rgba(255, 255, 255, 0.04) inset;
    animation: zygBarSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.5s;
}

@keyframes zygBarSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.zyg-mobile-cta-bar .zyg-m-cta {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 4px 9px;
    border-radius: 12px;
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-decoration: none;
    color: #fff;
    border: none;
    cursor: pointer;
    text-align: center;
    overflow: hidden;
    transition: transform 0.18s ease, filter 0.18s ease;
}

/* Top gloss on mobile buttons */
.zyg-mobile-cta-bar .zyg-m-cta::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 100%);
    border-radius: inherit;
    pointer-events: none;
}

.zyg-mobile-cta-bar .zyg-m-cta:active {
    transform: scale(0.94);
}

.zyg-m-cta-call {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(165, 180, 252, 0.3);
    box-shadow: none;
}

.zyg-m-cta-wa {
    background: linear-gradient(145deg, var(--whatsapp, #22c55e), var(--whatsapp-deep, #16a34a));
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
}

.zyg-m-cta-quote {
    background: var(--gradient-brand, linear-gradient(145deg, #8b5cf6, #6366f1));
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.zyg-m-cta .zyg-icon {
    font-size: 20px;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.zyg-mobile-cta-bar .zyg-m-cta.zyg-pulse {
    animation: zygMobilePulse 2.8s ease-in-out infinite;
}

@keyframes zygMobilePulse {
    0%, 100% { box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35), 0 0 0 0 rgba(139, 92, 246, 0.45); }
    55%       { box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35), 0 0 0 8px rgba(139, 92, 246, 0); }
}

@media (max-width: 950px) {
    .zyg-floating-ctas { display: none; }
    .zyg-mobile-cta-bar { display: grid; }
}

@media (max-width: 950px) {
    body.zyg-has-mobile-cta {
        padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

.zyg-app-header.zyg-scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

/* Modal popup */
.zyg-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, 0.88);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.zyg-modal-overlay.zyg-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.zyg-modal-overlay.zyg-open .zyg-modal {
    pointer-events: auto;
}

.zyg-modal {
    background: var(--card, #14141c);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.07));
    border-radius: 12px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 24px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.zyg-modal-overlay.zyg-open .zyg-modal {
    transform: translateY(0);
}

.zyg-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.zyg-modal h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.2;
}

.zyg-modal h2 span {
    color: var(--accent-light, #a5b4fc);
}

.zyg-modal .zyg-sub {
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 20px;
}

.zyg-modal .form-field-group {
    margin-bottom: 12px;
}

.zyg-modal .form-grid-budget {
    margin-top: 2px;
}

.zyg-modal .form-grid-service {
    margin-top: 2px;
}

.zyg-modal .option-box-clickable:not(.selected) {
    opacity: 1;
}

.zyg-modal .option-box-clickable {
    pointer-events: auto;
    position: relative;
    z-index: 1;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.zyg-modal .form-grid-service .option-box-clickable.selected,
.zyg-modal .form-grid-budget .option-box-clickable.selected {
    border-color: var(--accent, #6366f1);
    background: rgba(124, 111, 247, 0.14);
    color: var(--text, #f0f0ff);
}

.zyg-modal .option-box-clickable.selected .radio-dot-sim {
    border-color: var(--accent-light, #a5b4fc);
    background: var(--accent-light, #a5b4fc);
}

.zyg-modal #zyg-popup-submit {
    margin-top: 4px;
    width: 100%;
}

.zyg-hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    pointer-events: none;
}

.zyg-form-error {
    color: #f87171;
    font-size: 12px;
    margin-bottom: 8px;
    display: none;
}

.zyg-form-error.zyg-show { display: block; }

.zyg-form-success {
    text-align: center;
    padding: 32px 16px;
    display: none;
}

.zyg-form-success.zyg-show { display: block; }

.zyg-form-success h3 {
    font-size: 20px;
    color: var(--success, #4ade80);
    margin-bottom: 8px;
}

.zyg-btn-loading {
    opacity: 0.7;
    pointer-events: none;
}

.zyg-btn-loading::after {
    content: ' ...';
}

/* Multi-step form enhancements */
.zyg-multistep .zyg-progress-wrap {
    margin-bottom: 16px;
}

.zyg-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.zyg-progress-fill {
    height: 100%;
    background: var(--gradient-progress, linear-gradient(90deg, #4f46e5, #a5b4fc));
    border-radius: 4px;
    transition: width 0.35s ease;
    width: 25%;
}

.zyg-step-tabs {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #9ca3af;
}

.zyg-step-tabs .zyg-step-tab.active { color: var(--accent-light, #a5b4fc); }

.zyg-step-tab {
    cursor: pointer;
    user-select: none;
}

.zyg-step-tab:hover {
    color: #d1d5db;
}

.zyg-step-panel { display: none; flex-direction: column; gap: 12px; }
.zyg-step-panel.zyg-active { display: flex; }

.zyg-form-nav {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.zyg-btn-back {
    background: transparent;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    flex: 0 0 auto;
}

.zyg-btn-next { flex: 1; }

.zyg-thank-you {
    text-align: center;
    padding: 24px 8px;
}

.zyg-thank-you h3 { font-size: 22px; color: var(--success, #4ade80); margin-bottom: 8px; }
.zyg-thank-you p { font-size: 14px; color: #9ca3af; }

.option-box-clickable { cursor: pointer; transition: border-color 0.2s, opacity 0.2s; pointer-events: auto; touch-action: manipulation; }
button.option-box-clickable {
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    text-align: left;
    width: 100%;
    margin: 0;
}
.option-box-clickable:not(.selected):hover { opacity: 0.9; border-color: var(--accent, #6366f1); }

[data-cta], .card-micro-cta, .case-study-action, .tech-keyword-link { cursor: pointer; }
