/* ============================================================
   Portal Agency — Get Started Popup Widget
   assets/css/widget-get-started-popup.css

   Brand: Portal Talents
   Primary: #0068FF
   Font:    Comfortaa (matches site header buttons)
   All selectors scoped under .pgsp-* namespace
   ============================================================ */

/* ── Backdrop ─────────────────────────────────────────────────── */
.pgsp-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(5, 10, 30, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-sizing: border-box;
}

.pgsp-backdrop.pgsp-backdrop--open {
    opacity: 1;
    visibility: visible;
}

/* ── Modal ────────────────────────────────────────────────────── */
.pgsp-modal {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 36px 36px;
    width: 100%;
    max-width: 580px;
    box-shadow:
        0 0 0 1px rgba(0, 104, 255, 0.08),
        0 24px 80px rgba(0, 0, 0, 0.18),
        0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-sizing: border-box;
}

.pgsp-backdrop.pgsp-backdrop--open .pgsp-modal {
    transform: translateY(0) scale(1);
}

/* ── Close Button ─────────────────────────────────────────────── */
.pgsp-close {
    position: absolute;
    top: 12px;
    right: 12px;

    width: 36px;
    height: 36px;

    border: none;
    border-radius: 10px;

    background: transparent;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: all .25s ease;
    padding: 5px;
}

.pgsp-close svg {
    width: 18px;
    height: 18px;
    stroke: #111;
    stroke-width: 2.6;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pgsp-close:hover {
    background: transparent;
}

.pgsp-close:hover svg {
    stroke: #0068FF;
}

/* ── Header ───────────────────────────────────────────────────── */
.pgsp-header {
    text-align: center;
    margin-bottom: 32px;
}

.pgsp-title {
    font-family: 'Comfortaa', 'Segoe UI', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px;
    letter-spacing: -0.3px;
    line-height: 1.25;
}

.pgsp-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* ── Cards Container ──────────────────────────────────────────── */
.pgsp-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ── Single Card ──────────────────────────────────────────────── */
.pgsp-card {
    border: 1.5px solid #e5e9f0;
    border-radius: 16px;
    padding: 24px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
    background: #fafbfd;
    cursor: default;
}

.pgsp-card:hover {
    border-color: #0068FF;
    box-shadow: 0 4px 24px rgba(0, 104, 255, 0.12);
    transform: translateY(-3px);
    background: #fff;
}

/* ── Card Icon ────────────────────────────────────────────────── */
.pgsp-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #e8f0ff 0%, #dbeafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0068FF;
    flex-shrink: 0;
    transition: background 0.25s;
}

.pgsp-card:hover .pgsp-card__icon {
    background: linear-gradient(135deg, #0068FF 0%, #3b82f6 100%);
    color: #ffffff;
}

/* ── Card Body ────────────────────────────────────────────────── */
.pgsp-card__body {
    flex: 1;
}

.pgsp-card__title {
    font-family: 'Comfortaa', 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px;
    line-height: 1.3;
}

.pgsp-card__desc {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.55;
}

/* ── Card Actions ─────────────────────────────────────────────── */
.pgsp-card__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.pgsp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 10px;
    font-family: 'Comfortaa', 'Segoe UI', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    text-align: center;
    white-space: nowrap;
    box-sizing: border-box;
}

/* Primary — filled blue */
.pgsp-btn--primary {
    background: #0068FF;
    color: #ffffff;
    border: 1.5px solid #0068FF;
    box-shadow: 0 3px 12px rgba(0, 104, 255, 0.3);
}

.pgsp-btn--primary:hover {
    background: #0052cc;
    border-color: #0052cc;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(0, 104, 255, 0.4);
    text-decoration: none;
}

.pgsp-btn--primary svg {
    transition: transform 0.2s;
    flex-shrink: 0;
}

.pgsp-btn--primary:hover svg {
    transform: translateX(3px);
}

/* Ghost — outlined */
.pgsp-btn--ghost {
    background: transparent;
    color: #0068FF;
    border: 1.5px solid #d1ddf7;
}

.pgsp-btn--ghost:hover {
    background: #f0f5ff;
    border-color: #0068FF;
    color: #0068FF;
    text-decoration: none;
}

/* ── Entry animation for each card ───────────────────────────── */
@keyframes pgspCardIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pgsp-backdrop.pgsp-backdrop--open .pgsp-card:nth-child(1) {
    animation: pgspCardIn 0.4s 0.15s both ease;
}

.pgsp-backdrop.pgsp-backdrop--open .pgsp-card:nth-child(2) {
    animation: pgspCardIn 0.4s 0.25s both ease;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 560px) {
    .pgsp-modal {
        padding: 32px 20px 28px;
    }

    .pgsp-cards {
        grid-template-columns: 1fr;
    }

    .pgsp-card__actions {
        flex-direction: row;
    }

    .pgsp-btn {
        flex: 1;
    }
}

/* ══════════════════════════════════════════════════════════════
   My Profile Dropdown — logged-in state
   ══════════════════════════════════════════════════════════════ */

/* ── Profile Button (بيحل محل Get Started) ──────────────────── */
.pgsp-profile-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 16px 8px 10px !important;
    background: #ffffff !important;
    border: 1.5px solid #d1ddf7 !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    font-family: 'Comfortaa', 'Segoe UI', sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    transition: all 0.25s ease !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(0, 104, 255, 0.07) !important;
    line-height: 1 !important;
}

.pgsp-profile-btn:hover {
    background: #f0f5ff !important;
    border-color: #0068FF !important;
    color: #0068FF !important;
    text-decoration: none !important;
}

.pgsp-profile-btn__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8f0ff 0%, #dbeafe 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0068FF;
    flex-shrink: 0;
    transition: background 0.25s;
    vertical-align: middle;
}

.pgsp-profile-btn:hover .pgsp-profile-btn__avatar {
    background: linear-gradient(135deg, #0068FF 0%, #3b82f6 100%);
    color: #fff;
}

.pgsp-profile-btn__chevron {
    display: inline-flex;
    align-items: center;
    color: #6b7280;
    transition: transform 0.25s ease, color 0.25s;
    vertical-align: middle;
}

.pgsp-profile-btn:hover .pgsp-profile-btn__chevron {
    color: #0068FF;
}

/* ── Dropdown Wrapper (fixed في الـ body) ────────────────────── */
.pgsp-profile-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    overflow: visible;
    z-index: 999999;
    pointer-events: none;
}

/* ── Dropdown Menu ───────────────────────────────────────────── */
.pgsp-profile-menu {
    position: fixed;
    min-width: 190px;
    background: #ffffff;
    border: 1.5px solid #e5e9f0;
    border-radius: 14px;
    padding: 6px;
    box-shadow:
        0 0 0 1px rgba(0, 104, 255, 0.06),
        0 12px 40px rgba(0, 0, 0, 0.13),
        0 4px 12px rgba(0, 0, 0, 0.07);
    z-index: 999999;
    pointer-events: none;

    opacity: 0;
    visibility: hidden;
    transform: translateY(6px) scale(0.97);
    transform-origin: top right;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.pgsp-profile-wrap--open .pgsp-profile-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ── Menu Items ──────────────────────────────────────────────── */
.pgsp-profile-menu__item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px 14px !important;
    border-radius: 9px !important;
    font-family: 'Comfortaa', 'Segoe UI', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    text-decoration: none !important;
    transition: background 0.18s ease, color 0.18s ease !important;
    cursor: pointer !important;
    white-space: nowrap !important;
}

.pgsp-profile-menu__item:hover {
    background: #f0f5ff !important;
    color: #0068FF !important;
    text-decoration: none !important;
}

.pgsp-profile-menu__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: inherit;
}

.pgsp-profile-menu__icon svg {
    width: 16px;
    height: 16px;
}

.pgsp-profile-menu__divider {
    height: 1px;
    background: #f0f0f5;
    margin: 4px 8px;
}

.pgsp-profile-menu__item--logout {
    color: #dc2626 !important;
}

.pgsp-profile-menu__item--logout:hover {
    background: #fff5f5 !important;
    color: #dc2626 !important;
}