/* Navigation Components Styles */

/* Fixed Circle Menu (Left Side) */
.fixed_circle_menu {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 85;
    width: 60px;
    height: 60px;
}

.fixed_circle {
    position: absolute;
    width: 60px;
    height: 60px;
    background-color: #DC7E7E;
    border: 3px solid #282D3B;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 8px rgba(40, 45, 59, 0.08);
}

.fixed_circle svg {
    width: 24px;
    height: 24px;
}

.fixed_circle.sub {
    width: 51px;
    /* 60px * 0.85 */
    height: 51px;
    opacity: 0;
    pointer-events: none;
    transition:
        transform 0.35s cubic-bezier(.68, -0.55, .27, 1.55),
        opacity 0.2s 0.4s;
    /* задержка исчезновения 0.4s */
    left: 4.5px;
    /* (60-51)/2 */
    top: 4.5px;
    z-index: 999;
    cursor: pointer;
}

/* Позиции для выезжающих кнопок */
.fixed_circle.sub1 {
    /* 95deg */
    transform: translate(0, 0);
}

.fixed_circle.sub2 {
    /* 145deg */
    transform: translate(0, 0);
}

.fixed_circle.sub3 {
    /* 170deg */
    transform: translate(0, 0);
}

/* Показываем кнопки при hover/active на главной */
.fixed_circle_menu.fab-open .fixed_circle.sub {
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s, 0s;
}

.fixed_circle_menu.fab-open .fixed_circle.sub1 {
    transform: translate(20.7px, -77.3px);
}

.fixed_circle_menu.fab-open .fixed_circle.sub2 {
    transform: translate(63.4px, -48.7px);
}

.fixed_circle_menu.fab-open .fixed_circle.sub3 {
    transform: translate(80px, 0px);
}

.fixed_circle.main {
    z-index: 1001;
}

.fixed_circle.main:active {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(40, 45, 59, 0.2);
}

.fixed_circle.sub:hover {
    box-shadow: 0 4px 15px rgba(40, 45, 59, 0.18);
    background: #ffe066;
}

/* SpeedDial Menu for sub2 button */
.fixed_circle_speeddial_container {
    position: absolute;
    left: 4.5px; /* Base position from left - same as sub buttons */
    top: 4.5px; /* Base position from top - same as sub buttons */
    z-index: 1005; /* Increased z-index */
    display: none;
    align-items: flex-end;
    justify-content: flex-start;
    flex-direction: row-reverse;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Position speeddial container relative to sub2 button when menu is open */
.fixed_circle_menu.fab-open .fixed_circle_speeddial_container {
    display: flex;
    transform: translate(63.4px, -48.7px); /* Same transform as sub2 button */
}

/* Only show speeddial container when main menu is open */
.fixed_circle_menu.fab-open .fixed_circle_speeddial_container.speeddial-opened {
    opacity: 1;
    pointer-events: auto !important;
    z-index: 1005;
}

.fixed_circle_speeddial_menu {
    position: relative;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translate(60.5px, 60.5px) rotate(-45deg); /* Position below sub2 center: 25.5px (center) + 35px (offset) */
    transform-origin: 0 0; /* Origin at top-left of menu */
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.fixed_circle_speeddial_menu.speeddial-opened {
    opacity: 1;
    pointer-events: auto !important;
    transform: translate(47px, -8px) rotate(-30deg);
    z-index: 1006;
}

.fixed_circle_speeddial_item {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    opacity: 0;
    transform: translate(-35px, -35px) scale(0.5) rotate(45deg); /* Start from sub2 center position */
    pointer-events: auto !important;
    position: relative;
    z-index: 1006;
}

.fixed_circle_speeddial_menu.speeddial-opened .fixed_circle_speeddial_item {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(45deg); /* Final position - elements spread along 45deg line */
}

/* Stagger animation delays for each item */
.fixed_circle_speeddial_menu.speeddial-opened .fixed_circle_speeddial_item:nth-child(1) {
    transition-delay: 0ms;
}

.fixed_circle_speeddial_menu.speeddial-opened .fixed_circle_speeddial_item:nth-child(2) {
    transition-delay: 50ms;
}

.fixed_circle_speeddial_item .p-speeddial-action {
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    background: white;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    text-decoration: none;
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative;
    z-index: 1008;
}

.fixed_circle_speeddial_item .p-speeddial-action:hover {
    background: #f8f9fa;
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.fixed_circle_speeddial_item .p-speeddial-action:active {
    transform: scale(0.95);
}

.fixed_circle_speeddial_item .p-speeddial-action-icon {
    display: flex !important;
    align-items: center;
    justify-content: center;
    pointer-events: none !important;
    z-index: 1009;
}



/* SVG styles for news item only */
.fixed_circle_speeddial_item[data-item-type="news"] .p-speeddial-action-icon svg {
    width: 25px;
    height: 25px;
    color: inherit;
    fill: currentColor;
}

/* SVG styles for event item only */
.fixed_circle_speeddial_item[data-item-type="event"] .p-speeddial-action-icon svg {
    width: 16px;
    height: 16px;
    color: inherit;
    fill: currentColor;
}


/* ==========================================================================
   Base SpeedDial Styles (Consolidated)
   ========================================================================== */

.p-speeddial-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 10px;
}

.p-speeddial-item {
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.p-speeddial-opened .p-speeddial-item {
    opacity: 1;
    pointer-events: auto;
}

.p-speeddial-action {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    color: #374151;
    text-decoration: none;
    cursor: pointer;
}

.p-speeddial-action:hover {
    background: #f3f4f6;
    color: #282d3b;
    transform: scale(1.05);
}

/* ==========================================================================
   Context-Specific SpeedDial Overrides
   ========================================================================== */

/* 1. Touchpoint Sub-Menu Add Button */
.task_tracker_sub_menu_add_container .p-speeddial-list {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
}

.task_tracker_sub_menu_add_container .p-speeddial-item {
    transform: translateX(20px);
}

.task_tracker_sub_menu_add_container .p-speeddial-opened .p-speeddial-item {
    transform: translateX(0);
}

/* 2. Agenda View - Empty Task */
.smart-list-empty-task .p-speeddial-list {
    flex-direction: row-reverse;
    position: relative;
    z-index: 10;
}

.smart-list-empty-task .p-speeddial-item {
    transform: scale(0.8) translateY(10px);
    animation: speeddialItemShow 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
    pointer-events: auto !important;
    opacity: 1;
}

.smart-list-empty-task .p-speeddial-action {
    width: 40px;
    height: 40px;
    background-color: var(--surface-600, #4b5563);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.smart-list-empty-task .p-speeddial-action:hover {
    background-color: var(--primary-color, #3b82f6);
}

/* 3. Agenda View - Small Add Button */
.smart-list-tasks-add-btn .p-speeddial-item {
    transform: scale(0.8) translateY(10px);
    animation: speeddialItemShow 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
    pointer-events: auto !important;
    opacity: 1;
}

.smart-list-tasks-add-btn .p-speeddial-action {
    width: 20px;
    height: 20px;
    background-color: var(--surface-600, #4b5563);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.smart-list-tasks-add-btn .p-speeddial-action-icon {
    font-size: 9px;
}

@keyframes speeddialItemShow {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
