/**
 * UltraAddons Circle Menu Widget Stylesheet
 *
 * @package UltraAddons
 * @since 1.1.0.9
 */

.ua-circle-menu-wrap {
    display: flex;
    position: relative;
    box-sizing: border-box;
    width: 100%;
    justify-content: center;
    --ua-cm-duration: 500ms;
    --ua-cm-timing: ease;
    --ua-cm-btn-size: 50px;
}

.ua-circle-menu-inner {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--ua-cm-btn-size, 50px);
    height: var(--ua-cm-btn-size, 50px);
}

/* Horizontal Alignment */
.ua-circle-menu-wrap.ua-cm-align-left,
[class*="ua-cm-align-left"] .ua-circle-menu-wrap {
    justify-content: flex-start !important;
}

.ua-circle-menu-wrap.ua-cm-align-center,
[class*="ua-cm-align-center"] .ua-circle-menu-wrap {
    justify-content: center !important;
}

.ua-circle-menu-wrap.ua-cm-align-right,
[class*="ua-cm-align-right"] .ua-circle-menu-wrap {
    justify-content: flex-end !important;
}

/* Central Trigger Button */
.ua-cm-trigger {
    position: relative;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--ua-cm-btn-size, 50px);
    height: var(--ua-cm-btn-size, 50px);
    min-width: var(--ua-cm-btn-size, 50px);
    min-height: var(--ua-cm-btn-size, 50px);
    border: none;
    outline: none;
    cursor: pointer;
    background-color: #0274be;
    color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(2, 116, 190, 0.35);
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

.ua-cm-trigger:hover {
    transform: scale(1.06);
}

.ua-cm-trigger:focus-visible {
    outline: 2px solid #0274be;
    outline-offset: 3px;
}

.ua-cm-icon-open,
.ua-cm-icon-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.ua-cm-icon-close {
    position: absolute;
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
    pointer-events: none;
}

.ua-circle-menu-wrap.ua-cm-open .ua-cm-icon-open {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
    pointer-events: none;
}

.ua-circle-menu-wrap.ua-cm-open .ua-cm-icon-close {
    opacity: 1;
    transform: rotate(0) scale(1);
    pointer-events: auto;
}

/* Menu Items List */
.ua-cm-items {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ua-cm-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transform: translate(0, 0) scale(0.4);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--ua-cm-duration, 500ms) var(--ua-cm-timing, ease),
                opacity var(--ua-cm-duration, 500ms) var(--ua-cm-timing, ease),
                visibility var(--ua-cm-duration, 500ms);
    will-change: transform, opacity;
}

.ua-circle-menu-wrap.ua-cm-open .ua-cm-item {
    transform: translate(var(--ua-tx, 0px), var(--ua-ty, 0px)) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Menu Item Link */
.ua-cm-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: var(--ua-cm-btn-size, 50px);
    height: var(--ua-cm-btn-size, 50px);
    min-width: var(--ua-cm-btn-size, 50px);
    min-height: var(--ua-cm-btn-size, 50px);
    text-decoration: none;
    position: relative;
    border-radius: 50%;
    background-color: #0274be;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(2, 116, 190, 0.3);
    box-sizing: border-box;
    transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.ua-cm-link :is(i, svg) {
    color: inherit;
    fill: currentColor;
    font-size: 18px;
    width: 1em;
    height: 1em;
}

.ua-cm-link:hover {
    background-color: #005b94;
    color: #ffffff;
    transform: scale(1.12);
    box-shadow: 0 6px 18px rgba(2, 116, 190, 0.45);
}

.ua-cm-link:focus-visible {
    outline: 2px solid #0274be;
    outline-offset: 2px;
}

.ua-cm-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.ua-cm-item-title {
    color: inherit;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    margin-top: 2px;
    white-space: nowrap;
    text-align: center;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* Tooltip */
.ua-cm-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background-color: #1e293b;
    color: #ffffff;
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.2;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 30;
}

.ua-cm-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -4px;
    border-width: 4px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}

.ua-cm-link:hover .ua-cm-tooltip,
.ua-cm-link:focus-visible .ua-cm-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
