/* ── 하단 3분할 바 (Prev / 지원하기 / 현재 섹션+드로어) ── */
#campus-floating-nav.floating-bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    justify-content: center;
    pointer-events: none;
    /* 캔버스 창 아래 검정 띠(veil-bottom) 하단 여백 기준으로 정렬 */
    padding: 0 72px max(36px, env(safe-area-inset-bottom, 0px));
    font-family: 'Noto Serif KR', serif;
    font-weight: 500;
    color: var(--ai-campus-text, #fbf5e8);
    text-shadow: 0 1px 10px rgba(8, 14, 26, 0.42), 0 0 1px rgba(8, 14, 26, 0.55);
}

body.youth-ai-campus-edit:not(.ai-campus-view-preview) #campus-floating-nav {
    display: none !important;
}

.floating-bottom-bar-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    pointer-events: auto;
    gap: 24px;
}

.floating-bar-side {
    flex: 1 1 0;
    min-width: 0;
    font-size: 1rem;
    letter-spacing: 0.04em;
    text-decoration: none;
    color: inherit;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.floating-bar-side--left {
    text-align: left;
}

/* 왼쪽: 다른 과정 — 호버 시 청년·취업 카드 목록 */
.floating-bar-left {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    display: flex;
    justify-content: flex-start;
    text-align: left;
}

.floating-bar-youth-trigger {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: clamp(0.82rem, 0.32vw + 0.62rem, 0.98rem);
    font-weight: 400;
    letter-spacing: 0.03em;
    line-height: 1.2;
    cursor: pointer;
    opacity: 0.92;
    transition: opacity 0.2s ease;
}

.floating-bar-youth-trigger:hover {
    opacity: 0.82;
}

.floating-youth-cards-drawer {
    position: absolute;
    left: 0;
    bottom: 100%;
    min-width: 240px;
    max-width: min(320px, 52vw);
    padding: 12px 14px 10px;
    background: rgba(8, 14, 26, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition:
        opacity 0.28s cubic-bezier(0.76, 0, 0.24, 1),
        transform 0.28s cubic-bezier(0.76, 0, 0.24, 1),
        visibility 0.28s;
}

/* 트리거↔드로어 사이 호버 끊김 방지 */
.floating-youth-cards-drawer::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 18px;
}

.floating-bar-left:hover .floating-youth-cards-drawer,
.floating-bar-left:focus-within .floating-youth-cards-drawer,
.floating-bar-left.is-drawer-open .floating-youth-cards-drawer {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-youth-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: min(52vh, 360px);
    overflow-y: auto;
}

.floating-youth-cards-empty {
    margin: 0;
    font-size: 0.8125rem;
    opacity: 0.75;
    text-align: left;
}

.floating-youth-card-link {
    display: block;
    width: 100%;
    padding: 8px 6px;
    border: none;
    background: transparent;
    color: inherit;
    text-align: left;
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.floating-youth-card-link:hover:not(.is-disabled) {
    background: rgba(255, 255, 255, 0.08);
}

.floating-youth-card-link.is-disabled {
    cursor: default;
    opacity: 0.55;
}

.floating-youth-card-title {
    display: block;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.35;
}

.floating-youth-card-meta {
    display: block;
    margin-top: 2px;
    font-size: 0.6875rem;
    opacity: 0.65;
    line-height: 1.3;
}

.floating-bar-center {
    flex: 0 0 auto;
    text-align: center;
}

.floating-apply-btn {
    display: inline-block;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    font-size: clamp(1.08rem, 0.55vw + 0.68rem, 1.42rem);
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.15;
    color: inherit;
    cursor: pointer;
    font-family: inherit;
    transform-origin: center center;
    /* 부모 #campus-floating-nav text-shadow와 분리 — 버튼만 애니메이션 */
    text-shadow: 0 1px 10px rgba(8, 14, 26, 0.42), 0 0 1px rgba(8, 14, 26, 0.55);
    animation: floating-apply-pulse 1.4s ease-in-out infinite;
}

/* btn-employee-glow: 박스 글로우 + 크기 호흡 (스윕·깜빡 없음) */
@keyframes floating-apply-pulse {
    0%,
    100% {
        transform: translateY(-3px) scale(1);
        filter: brightness(1);
        text-shadow:
            0 1px 10px rgba(8, 14, 26, 0.42),
            0 0 1px rgba(8, 14, 26, 0.55),
            0 0 8px rgba(255, 252, 235, 0.35);
    }
    50% {
        transform: translateY(-3px) scale(1.07);
        filter: brightness(1.18);
        text-shadow:
            0 1px 10px rgba(8, 14, 26, 0.42),
            0 0 1px rgba(8, 14, 26, 0.55),
            0 0 20px rgba(255, 255, 245, 0.85),
            0 0 34px rgba(255, 240, 200, 0.45);
    }
}

.floating-apply-btn:hover {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .floating-apply-btn {
        animation: none;
    }
}

.floating-bar-right {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    display: flex;
    justify-content: flex-end;
    text-align: right;
}

.floating-bar-section-trigger {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: clamp(0.82rem, 0.32vw + 0.62rem, 0.98rem);
    font-weight: 400;
    letter-spacing: 0.03em;
    line-height: 1.2;
    color: inherit;
    opacity: 0.92;
}

.floating-bar-right:hover .floating-bar-section-trigger,
.floating-bar-right:focus-within .floating-bar-section-trigger {
    opacity: 1;
}

.floating-bar-section-current {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

/* 호버 시 아래→위 펼침 */
.floating-menu-drawer {
    position: absolute;
    right: 0;
    bottom: 100%;
    min-width: 200px;
    max-width: min(280px, 42vw);
    padding: 12px 14px 10px;
    background: rgba(8, 14, 26, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition:
        opacity 0.28s cubic-bezier(0.76, 0, 0.24, 1),
        transform 0.28s cubic-bezier(0.76, 0, 0.24, 1),
        visibility 0.28s;
}

.floating-menu-drawer::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 18px;
}

.floating-bar-right:hover .floating-menu-drawer,
.floating-bar-right:focus-within .floating-menu-drawer,
.floating-bar-right.is-drawer-open .floating-menu-drawer {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.floating-menu .menu-link {
    display: block;
    padding: 8px 6px;
    font-size: 0.8125rem;
    font-weight: 300;
    line-height: 1.4;
    letter-spacing: 0.04em;
    color: inherit;
    text-decoration: none;
    text-align: right;
    white-space: nowrap;
    opacity: 0.62;
    transition: opacity 0.2s ease, font-weight 0.2s ease;
}

.floating-menu .menu-link:hover {
    opacity: 0.92;
}

.floating-menu .menu-link span {
    display: inline-block;
    padding: 0 2px 3px;
}

.floating-menu li.is-active .menu-link {
    opacity: 1;
    font-weight: 400;
}

.floating-menu li.is-active .menu-link span {
    box-shadow: inset 0 -0.18em 0 var(--ai-campus-bg, var(--bg-color, #2d4d7a));
}

@media (max-width: 900px) {
    #campus-floating-nav.floating-bottom-bar {
        padding: 0 24px max(12px, env(safe-area-inset-bottom, 0px));
    }

    .floating-bottom-bar-inner {
        gap: 12px;
    }

    .floating-bar-youth-trigger,
    .floating-bar-section-trigger {
        font-size: 0.75rem;
    }

    .floating-apply-btn {
        font-size: 1.0625rem;
    }
}

/* 모바일: 하단 바 표시 (예전에는 display:none으로 숨김) + 터치·좁은 화면 레이아웃 */
@media (max-width: 768px) {
    #campus-floating-nav.floating-bottom-bar {
        z-index: 120100;
        bottom: 22px;
        padding: 0 20px max(6px, env(safe-area-inset-bottom, 0px));
    }

    .floating-bottom-bar-inner {
        gap: 6px;
        align-items: center;
    }

    .floating-bar-youth-trigger,
    .floating-bar-section-current {
        display: inline-block;
        max-width: 30vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: bottom;
    }

    .floating-bar-left {
        padding-left: 4px;
    }

    .floating-bar-youth-trigger,
    .floating-bar-section-trigger {
        font-size: 0.78rem;
        font-weight: 500;
        letter-spacing: 0.02em;
        opacity: 0.88;
        line-height: 1.15;
    }

    .floating-apply-btn {
        font-size: 1.125rem;
        font-weight: 600;
        letter-spacing: 0.04em;
        animation: none;
        transform: none;
    }

    .floating-youth-cards-drawer,
    .floating-menu-drawer {
        min-width: 200px;
        max-width: min(300px, calc(100vw - 24px));
    }

    /* 터치: 탭으로 연 드로어(is-drawer-open)는 호버 없이도 표시 */
    .floating-bar-left.is-drawer-open .floating-youth-cards-drawer,
    .floating-bar-right.is-drawer-open .floating-menu-drawer {
        pointer-events: auto;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* 섹션 마커 (편집 모드) */
.cv-section-marker {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(99, 179, 237, 0.6);
    pointer-events: auto;
    z-index: 200;
    cursor: pointer;
    box-sizing: border-box;
}

.cv-section-marker-label {
    position: absolute;
    left: 8px;
    top: -18px;
    font-size: 11px;
    color: #63b3ed;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    pointer-events: none;
}

body:not(.youth-ai-campus-edit) .cv-section-marker,
body.ai-campus-view-preview .cv-section-marker {
    display: none !important;
    pointer-events: none !important;
}

/* 플로팅 메뉴 편집 패널 */
.ai-floating-apply-fields,
.ai-floating-external-fields {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-floating-apply-fields .ai-campus-editor-field,
.ai-floating-external-fields .ai-campus-editor-field {
    margin-bottom: 8px;
}

.ai-floating-menu-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-floating-menu-row-label {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    color: rgba(245, 240, 232, 0.85);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-floating-menu-row-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.ai-floating-menu-row-actions button {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(245, 240, 232, 0.75);
    cursor: pointer;
    font-size: 11px;
    padding: 0;
}

.ai-floating-menu-row-actions button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.ai-floating-menu-row-actions button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.14);
}

#ai-campus-floating-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
