/* ================================================
   FEEDBACK PAGE — صفحة صندوق الشكاوى والمقترحات
   مستقلة، سرية، متجاوبة مع PWA
   ================================================ */

.feedback-page {
    min-height: 100vh;
    min-height: 100dvh;
    background: linear-gradient(165deg, #f0f4f8 0%, #e8eef5 40%, #f8fafc 100%);
    padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
}

.feedback-page__topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.feedback-page__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}

.feedback-page__brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #1e3a5f);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feedback-page__brand-icon img {
    width: 28px;
    height: 28px;
}

.feedback-page__brand-text h1 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    font-family: 'Cairo', sans-serif;
    color: #fff !important;
    line-height: 1.3;
}

.feedback-page__brand-text p {
    margin: 0;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.65) !important;
}

.feedback-page__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.2s;
    white-space: nowrap;
}

.feedback-page__back:hover {
    background: rgba(255, 255, 255, 0.18);
}

.feedback-page__hero {
    text-align: center;
    padding: 36px 20px 28px;
    max-width: 720px;
    margin: 0 auto;
}

.feedback-page__hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
    color: #fff !important;
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.feedback-page__hero h2 {
    margin: 0 0 10px;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    color: #0f172a !important;
    font-family: 'Cairo', sans-serif;
}

.feedback-page__hero p {
    margin: 0;
    color: #64748b !important;
    font-size: 0.95rem;
    line-height: 1.75;
}

.feedback-page__privacy-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 12px;
    font-size: 0.82rem;
    color: #047857 !important;
    font-weight: 600;
}

.feedback-page__privacy-strip i {
    color: #059669 !important;
    flex-shrink: 0;
}

.feedback-page__container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

#af-preview-modal {
    z-index: 100001 !important;
}

#af-preview-modal .modal-content {
    z-index: 100002;
}

.af-fullscreen-portal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: linear-gradient(165deg, #f0f4f8 0%, #e8eef5 40%, #f8fafc 100%);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.af-fullscreen-portal .academic-feedback-form-panel {
    overflow: visible;
}

.af-fullscreen-portal .af-options-grid,
.af-fullscreen-portal .af-check-card,
.af-fullscreen-portal .af-check-card__label,
.af-fullscreen-portal .af-check-card__text {
    overflow: visible;
    max-width: 100%;
}

    display: none !important;
}

body.af-portal-open {
    overflow: hidden !important;
}

.af-portal-hero {
    padding: 24px 20px 16px;
}

.feedback-page__back {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

@media (max-width: 768px) {
    .af-portal-hero h2 { font-size: 1.35rem; }
    .af-portal-hero p { font-size: 0.88rem; }
}

/* Floating launcher on homepage */
.af-floating-launcher {
    position: fixed;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    left: 24px;
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px 12px 14px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: #fff !important;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(30, 58, 95, 0.45), 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    max-width: calc(100vw - 48px);
    cursor: pointer;
    font-family: inherit;
}

.af-floating-launcher:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.5);
    color: #fff !important;
}

.af-floating-launcher__pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50px;
    border: 2px solid rgba(37, 99, 235, 0.4);
    animation: af-pulse-ring 2.5s ease-out infinite;
    pointer-events: none;
}

@keyframes af-pulse-ring {
    0% { transform: scale(1); opacity: 0.7; }
    70% { transform: scale(1.08); opacity: 0; }
    100% { transform: scale(1.08); opacity: 0; }
}

.af-floating-launcher__icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.af-floating-launcher__icon img {
    width: 26px;
    height: 26px;
}

.af-floating-launcher__label {
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    font-family: 'Cairo', sans-serif;
}

/* Homepage CTA card (replaces inline form) */
.af-home-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    padding: 36px 28px;
    background: #fff;
    border: 1px solid rgba(30, 58, 95, 0.1);
    border-radius: 20px;
    margin-bottom: 28px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
}

.af-home-cta__icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    display: flex;
    align-items: center;
    justify-content: center;
}

.af-home-cta__icon-wrap img {
    width: 40px;
    height: 40px;
}

.af-home-cta h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a !important;
}

.af-home-cta p {
    margin: 0;
    color: #64748b !important;
    font-size: 0.92rem;
    line-height: 1.7;
    max-width: 480px;
}

.af-home-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #1e3a5f, #2563eb) !important;
    color: #fff !important;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.af-home-cta__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.45);
    color: #fff !important;
}

.academic-public-title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a !important;
}

@media (max-width: 768px) {
    .feedback-page__topbar {
        padding: 12px 14px;
        padding-top: calc(12px + env(safe-area-inset-top, 0px));
    }

    .feedback-page__brand-text h1 { font-size: 0.88rem; }
    .feedback-page__back span { display: none; }

    .af-floating-launcher {
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        left: 16px;
        padding: 10px 14px 10px 10px;
    }

    .af-floating-launcher__label {
        font-size: 0.78rem;
        max-width: 120px;
        white-space: normal;
        line-height: 1.3;
    }
}

@media (max-width: 420px) {
    .af-floating-launcher__label { display: none; }
    .af-floating-launcher { padding: 12px; border-radius: 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .af-floating-launcher__pulse { animation: none; }
}
