/* ══════════════════════════════════════════════
   КАРТА ЭМОЦИЙ + РАСПИСАНИЕ + МОДАЛКА ЗАПИСИ
   ══════════════════════════════════════════════ */

/* ---------- КАРТА ЭМОЦИЙ ---------- */
.emotion-map-section {
    padding: 100px 0;
    position: relative;
}

.emotion-map-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
    max-width: 1100px;
    margin: 60px auto 0;
}

@media (max-width: 900px) {
    .emotion-map-wrapper {
        grid-template-columns: 1fr;
    }
}

.emotion-wheel-container {
    position: relative;
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    aspect-ratio: 1/1;
    filter: drop-shadow(0 0 50px rgba(212, 175, 55, 0.18));
}

/* пульсация центрального ядра через ::before */
.emotion-wheel-container::before {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 140px; height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251,230,142,0.25) 0%, transparent 70%);
    animation: core-pulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes core-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1);   opacity: 0.7; }
    50%      { transform: translate(-50%, -50%) scale(1.2); opacity: 1;   }
}

#emotionWheel {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
    overflow: visible;
}

/* КОНТЕЙНЕР УЗЛА (scale только тут — translate делает родитель) */
.emotion-node {
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.5, 1);
    transform-box: fill-box;
    transform-origin: center;
}

.emotion-node:hover {
    transform: scale(1.18);
}

.emotion-node.selected {
    transform: scale(1.15);
}

.emotion-node .node-core {
    transition: fill-opacity 0.3s, stroke-width 0.3s, stroke-opacity 0.3s;
}

.emotion-node:hover .node-core {
    fill-opacity: 0.38;
    stroke-width: 2;
    stroke-opacity: 1;
}

.emotion-node.selected .node-core {
    fill-opacity: 0.55;
    stroke: #ffd700;
    stroke-width: 2.5;
    stroke-opacity: 1;
}

/* Свечение-гало вокруг узла — проявляется при hover/selected */
.emotion-node .node-halo {
    transition: fill-opacity 0.4s ease, r 0.4s ease;
    pointer-events: none;
}

.emotion-node:hover .node-halo {
    fill-opacity: 0.18;
}

.emotion-node.selected .node-halo {
    fill-opacity: 0.3;
    animation: halo-breathe 2.4s ease-in-out infinite;
}

@keyframes halo-breathe {
    0%, 100% { fill-opacity: 0.25; }
    50%      { fill-opacity: 0.45; }
}

/* эмодзи */
.emotion-node .node-emoji {
    font-size: 20px;
    pointer-events: none;
    user-select: none;
    transition: font-size 0.3s;
}

.emotion-node:hover .node-emoji {
    font-size: 22px;
}

/* ---------- ПОДПИСИ (в отдельном слое #emotionLabels) ---------- */
.emotion-label-group {
    opacity: 0;
    transform: scale(0.85);
    transform-box: fill-box;
    transform-origin: center;
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.4, 0.5, 1);
    pointer-events: none;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
}

.emotion-label-group.visible {
    opacity: 1;
    transform: scale(1);
}

.emotion-label-text {
    font-size: 11px;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.3px;
    font-weight: 500;
}

/* ---------- СВЯЗИ: дуги в кольце + радиальные лучи ---------- */
.ring-link {
    transition: stroke-opacity 0.4s ease;
    animation: link-breathe 6s ease-in-out infinite;
}

.radial-link {
    transition: stroke-opacity 0.4s ease;
    animation: link-breathe 8s ease-in-out infinite;
}

@keyframes link-breathe {
    0%, 100% { stroke-opacity: var(--dim, 0.15); }
    50%      { stroke-opacity: var(--bright, 0.3); }
}

.ring-link   { --dim: 0.18; --bright: 0.38; }
.radial-link { --dim: 0.08; --bright: 0.22; }

/* ---------- ЛИНИЯ МАРШРУТА ---------- */
.route-path-line {
    animation: route-dash 1.8s linear infinite;
}

@keyframes route-dash {
    to { stroke-dashoffset: -24; }
}

/* лёгкое «дыхание» всех узлов — статично, но живо */
#emotionNodes > g {
    animation: node-float 6s ease-in-out infinite;
}
#emotionNodes > g:nth-child(odd)  { animation-delay: -2s; }
#emotionNodes > g:nth-child(3n)   { animation-delay: -4s; }

@keyframes node-float {
    0%, 100% { opacity: 0.92; }
    50%      { opacity: 1;    }
}

/* ---------- ПАНЕЛЬ МАРШРУТА ---------- */
.route-panel {
    padding: 35px 30px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.route-panel h3 {
    margin: 0 0 20px;
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: #ffd700;
    text-align: center;
}

.route-list {
    list-style: none;
    counter-reset: route-step;
    padding: 0;
    margin: 0;
    min-height: 160px;
    max-height: 260px;
    overflow-y: auto;
}

.route-list li {
    --accent: #ffd700;
    counter-increment: route-step;
    padding: 12px 38px 12px 50px;
    margin-bottom: 8px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-left: 3px solid var(--accent);
    border-radius: 10px;
    position: relative;
    animation: route-appear 0.4s ease both;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.route-list li::before {
    content: counter(route-step);
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbe68e, var(--accent));
    color: #0b1a21;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 40%, transparent);
}

.route-list li .step-name {
    flex: 1;
}

.route-list li .emoji-ic {
    margin-right: 8px;
    font-size: 1.1rem;
}

.route-list li .remove-step {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.45;
    cursor: pointer;
    transition: opacity 0.2s, color 0.2s;
    font-size: 0.9rem;
}

.route-list li .remove-step:hover {
    opacity: 1;
    color: #ff8b8b;
}

.route-list li.route-empty {
    padding: 20px;
    text-align: center;
    opacity: 0.5;
    font-style: italic;
    background: transparent;
    border: none;
}

.route-list li.route-empty::before {
    content: "";
}

@keyframes route-appear {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.route-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: #ffd700;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.25s;
}

.btn-ghost:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: #ffd700;
}

/* ---------- РАСПИСАНИЕ ---------- */
.schedule-section {
    padding: 80px 0;
}

.schedule-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 30px 0 25px;
}

.schedule-tab {
    padding: 10px 24px;
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: #ccc;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s;
}

.schedule-tab.active {
    background: linear-gradient(135deg, #b8860b, #ffd700);
    color: #0b1a21;
    border-color: transparent;
    font-weight: bold;
}

.schedule-table-wrap {
    padding: 10px;
    max-width: 1000px;
    margin: 0 auto;
    overflow-x: auto;
}

.schedule-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    font-family: 'Montserrat', sans-serif;
}

.schedule-table th {
    text-align: left;
    padding: 12px 18px;
    color: #ffd700;
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.schedule-table td {
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    vertical-align: top;
}

.schedule-table td:first-child {
    border-left: 1px solid rgba(212, 175, 55, 0.1);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    white-space: nowrap;
    color: #fbe68e;
}

.schedule-table td:last-child {
    border-right: 1px solid rgba(212, 175, 55, 0.1);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.route-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.route-chip {
    padding: 4px 10px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 12px;
    font-size: 0.82rem;
    color: #fbe68e;
}

.loading, .empty-row {
    text-align: center;
    padding: 30px;
    opacity: 0.6;
    font-style: italic;
}

/* ---------- КОЛОНКА «УЧАСТИЕ» В РАСПИСАНИИ ---------- */
.schedule-hint {
    margin: 18px 4px 0;
    opacity: 0.65;
    font-size: 0.86rem;
    text-align: center;
    font-style: italic;
}

.lesson-action-cell {
    min-width: 200px;
    text-align: right;
}

.btn-enroll {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    border: none;
}

.btn-enroll.btn-gold {
    background: linear-gradient(135deg, #b8860b, #ffd700);
    color: #10131a;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.25);
}

.btn-enroll.btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(212, 175, 55, 0.45);
}

.btn-enroll.btn-ghost {
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #fbe68e;
}

.btn-enroll.btn-ghost:hover {
    background: rgba(212, 175, 55, 0.16);
    border-color: #ffd700;
}

.action-enrolled {
    display: inline-block;
    padding: 8px 14px;
    background: rgba(94, 230, 182, 0.1);
    border: 1px solid rgba(94, 230, 182, 0.4);
    color: #5ee6b6;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 500;
}

.action-muted { opacity: 0.35; }

/* ---------- ТОСТ-УВЕДОМЛЕНИЯ ---------- */
.site-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translate(-50%, 20px);
    padding: 14px 24px;
    background: rgba(20, 25, 30, 0.96);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: #fbe68e;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10001;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    max-width: 90vw;
    text-align: center;
}

.site-toast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.site-toast.success {
    border-color: rgba(94, 230, 182, 0.5);
    color: #a8f0d4;
}

.site-toast.error {
    border-color: rgba(255, 107, 107, 0.5);
    color: #ffb4a2;
}

/* ---------- МОДАЛКА ЗАПИСИ ---------- */
.enroll-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
}

.enroll-modal.active {
    display: flex;
    animation: fade-in 0.25s;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.enroll-modal-content {
    position: relative;
    padding: 40px 35px;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(212, 175, 55, 0.35);
    animation: slide-up 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slide-up {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.enroll-close {
    position: absolute;
    top: 15px;
    right: 20px;
    cursor: pointer;
    color: #aaa;
    font-size: 1.3rem;
    transition: color 0.2s;
}

.enroll-close:hover { color: #fff; }

.enroll-modal h3 {
    margin: 0 0 10px;
    color: #ffd700;
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
}

.enroll-sub {
    opacity: 0.75;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.enroll-list {
    margin: 15px 0;
    max-height: 280px;
    overflow-y: auto;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    padding: 10px 0;
}

.enroll-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    margin: 4px 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.enroll-item:hover {
    background: rgba(212, 175, 55, 0.08);
}

.enroll-item.selected {
    border-color: #ffd700;
    background: rgba(212, 175, 55, 0.12);
}

.enroll-item input[type="checkbox"] {
    margin-top: 3px;
    accent-color: #ffd700;
}

.enroll-item .meta {
    flex: 1;
}

.enroll-item .meta .d { color: #fbe68e; font-size: 0.85rem; }
.enroll-item .meta .t { font-weight: 500; margin: 3px 0; }
.enroll-item .meta .r { font-size: 0.78rem; opacity: 0.7; }

.enroll-error {
    color: #ff8b8b;
    font-size: 0.9rem;
    margin-top: 10px;
    min-height: 20px;
}
