/* RecrutaTech PWA Prompts - Install + Fullscreen (agressivo) */

/* ===== INSTALL BANNER ===== */
.pwa-install {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 9998;
    background: linear-gradient(135deg, #241348 0%, #3a1f6b 100%);
    color: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.08);
    padding: 16px;
    padding-right: 20px;
    display: flex;
    gap: 12px;
    align-items: center;
    transform: translateY(140%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.28s ease, visibility 0.28s;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow: visible;
}
.pwa-install--visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.pwa-install__icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.pwa-install__icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}
.pwa-install__content {
    flex: 1;
    min-width: 0;
}
.pwa-install__title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 4px;
    color: #fff;
}
.pwa-install__desc {
    font-size: 12.5px;
    line-height: 1.35;
    margin: 0;
    color: rgba(255,255,255,0.82);
}
.pwa-install__actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}
.pwa-install__btn {
    border: none;
    border-radius: 10px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s, opacity 0.15s, background 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1;
}
.pwa-install__btn:active { transform: scale(0.96); }
.pwa-install__btn--primary {
    background: #fff;
    color: #241348;
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
}
.pwa-install__btn--primary:hover { background: #f2eaff; }
.pwa-install__btn--ghost {
    background: rgba(255,255,255,0.14);
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    padding: 6px 12px;
}
.pwa-install__btn--ghost:hover { background: rgba(255,255,255,0.22); }
.pwa-install__dismiss {
    position: absolute;
    top: -10px;
    right: -8px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #fff;
    color: #241348;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(0,0,0,0.22), 0 0 0 1px rgba(0,0,0,0.06);
    z-index: 2;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.pwa-install__dismiss:hover {
    background: #f2eaff;
    transform: scale(1.06);
    box-shadow: 0 6px 18px rgba(0,0,0,0.26);
}
.pwa-install__dismiss:active { transform: scale(0.96); }
.pwa-install__dismiss:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(91,120,246,0.35);
}

@media (max-width: 380px) {
    .pwa-install { padding: 14px; gap: 10px; }
    .pwa-install__title { font-size: 14px; }
    .pwa-install__desc { font-size: 11.5px; }
}

/* ===== INSTALL MODAL (iOS / manual) ===== */
.pwa-install-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(12, 8, 24, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s;
}
.pwa-install-modal--visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.pwa-install-modal__card {
    background: #fff;
    border-radius: 20px;
    max-width: 420px;
    width: 100%;
    padding: 24px 20px 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    text-align: center;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.pwa-install-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #ece8ff;
    background: #fff;
    color: #241348;
    cursor: pointer;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    z-index: 2;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.pwa-install-modal__close:hover {
    background: #f3f0ff;
    transform: scale(1.06);
    box-shadow: 0 6px 18px rgba(0,0,0,0.16);
}
.pwa-install-modal__close:active { transform: scale(0.96); }
.pwa-install-modal__close:focus-visible {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}
.pwa-install-modal__icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #241348, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    overflow: hidden;
}
.pwa-install-modal__icon img { width: 40px; height: 40px; }
.pwa-install-modal__title {
    font-size: 18px;
    font-weight: 800;
    color: #1a1240;
    margin: 0 0 8px;
}
.pwa-install-modal__desc {
    font-size: 13.5px;
    color: #5a5870;
    line-height: 1.5;
    margin: 0 0 18px;
}
.pwa-install-modal__steps {
    text-align: left;
    background: #f8f7ff;
    border: 1px solid #ece8ff;
    border-radius: 14px;
    padding: 14px;
    margin: 0 0 16px;
}
.pwa-install-modal__steps-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #7c3aed;
    margin: 0 0 10px;
}
.pwa-install-modal__step {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
    font-size: 13px;
    color: #2d2a40;
    line-height: 1.4;
}
.pwa-install-modal__step:last-child { margin-bottom: 0; }
.pwa-install-modal__step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #241348;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pwa-install-modal__hint {
    font-size: 11.5px;
    color: #8a89a0;
    margin: 0;
}

/* ===== FULLSCREEN NAG (barra) ===== */
.pwa-fullscreen-nag {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9997;
    background: linear-gradient(90deg, #ff3b30 0%, #ff6b35 100%);
    color: #fff;
    padding: 10px 12px 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.32s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.24s;
    box-shadow: 0 4px 16px rgba(255,59,48,0.35);
    font-family: 'Inter', system-ui, sans-serif;
}
.pwa-fullscreen-nag--visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.pwa-fullscreen-nag__icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255,255,255,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}
.pwa-fullscreen-nag__text {
    flex: 1;
    min-width: 0;
}
.pwa-fullscreen-nag__title {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
}
.pwa-fullscreen-nag__desc {
    font-size: 11.5px;
    opacity: 0.92;
    margin: 1px 0 0;
    line-height: 1.2;
}
.pwa-fullscreen-nag__actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.pwa-fullscreen-nag__btn {
    border: none;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: transform 0.12s, opacity 0.12s;
}
.pwa-fullscreen-nag__btn:active { transform: scale(0.96); }
.pwa-fullscreen-nag__btn--primary {
    background: #fff;
    color: #c5301a;
}
.pwa-fullscreen-nag__btn--ghost {
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-weight: 600;
}

/* ===== FULLSCREEN MODAL (agressivo - enche o saco) ===== */
.pwa-fullscreen-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(15, 10, 30, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s;
}
.pwa-fullscreen-modal--visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.pwa-fullscreen-modal__card {
    background: #fff;
    border-radius: 22px;
    max-width: 440px;
    width: 100%;
    padding: 28px 22px 20px;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0,0,0,0.45);
    position: relative;
    animation: pwa-pop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pwa-pop {
    0% { transform: scale(0.86) translateY(10px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}
.pwa-fullscreen-modal__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff1f0;
    color: #c5301a;
    border: 1px solid #ffd5d2;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.pwa-fullscreen-modal__icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ff3b30, #ff8c42);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #fff;
    font-size: 32px;
    box-shadow: 0 8px 24px rgba(255,59,48,0.35);
}
.pwa-fullscreen-modal__title {
    font-size: 20px;
    font-weight: 900;
    color: #1a1240;
    margin: 0 0 8px;
    line-height: 1.15;
}
.pwa-fullscreen-modal__desc {
    font-size: 14px;
    color: #5a5870;
    line-height: 1.5;
    margin: 0 0 18px;
}
.pwa-fullscreen-modal__desc strong { color: #1a1240; }
.pwa-fullscreen-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pwa-fullscreen-modal__btn {
    border: none;
    border-radius: 12px;
    padding: 13px 18px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.12s, box-shadow 0.15s;
    width: 100%;
}
.pwa-fullscreen-modal__btn:active { transform: scale(0.98); }
.pwa-fullscreen-modal__btn--primary {
    background: linear-gradient(135deg, #ff3b30 0%, #ff6b35 100%);
    color: #fff;
    box-shadow: 0 6px 18px rgba(255,59,48,0.35);
}
.pwa-fullscreen-modal__btn--primary:hover { box-shadow: 0 8px 22px rgba(255,59,48,0.45); }
.pwa-fullscreen-modal__btn--ghost {
    background: #f3f0ff;
    color: #5a5870;
    font-weight: 600;
    font-size: 13px;
    padding: 10px;
}
.pwa-fullscreen-modal__hint {
    font-size: 11px;
    color: #9a99b0;
    margin: 12px 0 0;
    line-height: 1.4;
}

/* Quando o nag de fullscreen está visível, empurra o conteúdo para baixo (opcional) */
body:has(.pwa-fullscreen-nag--visible) .main__body {
    padding-top: 56px;
}
