/* ==========================================================================
   L2Enjoy - Staff Floating Widget Stylesheet
   This stylesheet styles the medieval-themed floating staff widget on the left side.
   ========================================================================== */

.staff-widget {
    position: fixed;
    left: max(30 / 1280 * 100vh, 20px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: max(25 / 1280 * 100vh, 15px);
    font-family: var(--secondary-font), sans-serif;
    pointer-events: auto;
}

/* Hide on mobile and tablets to prevent overlap */
@media (max-width: 1024px) {
    .staff-widget {
        display: none !important;
    }
}

/* Header style with a rotating shield / square */
.staff-widget__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: -7px;
    margin-bottom: 5px;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.staff-widget__header:hover {
    opacity: 1;
}

.staff-widget__header-icon {
    width: 32px;
    height: 32px;
    background: #0f1c29;
    border: 2px solid var(--brand-color);
    transform: rotate(45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(234, 196, 133, 0.3);
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}

.staff-widget__header:hover .staff-widget__header-icon {
    transform: rotate(225deg);
    box-shadow: 0 0 20px rgba(234, 196, 133, 0.6);
}

.staff-widget__header-icon i {
    transform: rotate(-45deg);
    font-size: 15px;
    color: var(--brand-color);
    text-shadow: 0 0 5px rgba(234, 196, 133, 0.6);
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.staff-widget__header:hover .staff-widget__header-icon i {
    transform: rotate(-225deg);
}

.staff-widget__header-title {
    font-family: var(--primary-font), "Angelus Medieval", serif;
    font-size: max(18 / 1280 * 100vh, 18px);
    font-weight: normal;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(234, 196, 133, 0.5);
}

/* List with a glowing vertical golden line */
.staff-widget__list {
    position: relative;
    padding: 15px 0 15px 15px;
    display: flex;
    flex-direction: column;
    gap: max(25 / 1280 * 100vh, 20px);
}

.staff-widget__list::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, rgba(234, 196, 133, 0) 0%, rgba(234, 196, 133, 0.8) 20%, rgba(234, 196, 133, 0.8) 80%, rgba(234, 196, 133, 0) 100%);
    box-shadow: 0 0 8px rgba(234, 196, 133, 0.5);
}

/* Staff Items styling */
.staff-widget__item {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    min-height: 24px;
}

/* Decorative rotating diamond indicator on the vertical line */
.staff-widget__item-dot {
    position: absolute;
    left: -24px; /* Centered perfectly on the 2px vertical line */
    width: 18px;
    height: 18px;
    background: #091522;
    border: 1.5px solid var(--brand-color);
    transform: rotate(45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.staff-widget__item-dot i {
    transform: rotate(-45deg);
    font-size: 9px;
    color: var(--brand-color);
    transition: color 0.3s ease, transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.staff-widget__item:hover .staff-widget__item-dot {
    transform: rotate(135deg) scale(1.2);
    background-color: var(--brand-color);
    border-color: #ffffff;
    box-shadow: 0 0 12px var(--brand-color);
}

.staff-widget__item:hover .staff-widget__item-dot i {
    color: #091522;
    transform: rotate(-135deg);
}

/* Content wrapper that slides out to the right */
.staff-widget__item-content {
    padding-left: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), padding-left 0.3s ease;
}

.staff-widget__item-name {
    font-family: var(--secondary-font), sans-serif;
    font-size: max(15 / 1280 * 100vh, 15px);
    font-weight: 500;
    color: #c9cbce;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    transition: color 0.3s ease, text-shadow 0.3s ease;
    line-height: 1.1em;
}

.staff-widget__item:hover .staff-widget__item-name {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(234, 196, 133, 0.8), 0 2px 4px rgba(0, 0, 0, 0.9);
}

.staff-widget__item:hover .staff-widget__item-content {
    padding-left: 20px;
    transform: translateX(2px);
}

/* Expandable roles and active indicators */
.staff-widget__item-role {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 0;
    opacity: 0;
    overflow: hidden;
    transition: height 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), margin-top 0.3s ease;
}

.staff-widget__item:hover .staff-widget__item-role {
    height: 18px;
    opacity: 1;
    margin-top: 5px;
}

/* Beautiful Role Badges */
.staff-widget__role-badge {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: 2px;
    line-height: 1.2em;
    box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.05);
}

.staff-widget__role-badge--admin {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    text-shadow: 0 0 3px rgba(239, 68, 68, 0.5);
}

.staff-widget__role-badge--dev {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
    text-shadow: 0 0 3px rgba(59, 130, 246, 0.5);
}

.staff-widget__role-badge--cm {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
    text-shadow: 0 0 3px rgba(16, 185, 129, 0.5);
}

.staff-widget__role-badge--gm {
    background: rgba(167, 139, 250, 0.15);
    border: 1px solid rgba(167, 139, 250, 0.4);
    color: #d8b4fe;
    text-shadow: 0 0 3px rgba(167, 139, 250, 0.5);
}

/* Real-time Status Pulse Indicators */
.staff-widget__status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.staff-widget__status-dot--online {
    background-color: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.staff-widget__status-dot--online::after {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 1.5px solid #10b981;
    animation: status-pulse 2s infinite cubic-bezier(0.25, 0, 0, 1);
    opacity: 0;
}

.staff-widget__status-dot--dev {
    background-color: #3b82f6;
    box-shadow: 0 0 8px #3b82f6;
}

.staff-widget__status-dot--dev::after {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 1.5px solid #3b82f6;
    animation: status-pulse 2s infinite cubic-bezier(0.25, 0, 0, 1);
    opacity: 0;
}

@keyframes status-pulse {
    0% {
        transform: scale(0.7);
        opacity: 0.8;
    }
    100% {
        transform: scale(2.4);
        opacity: 0;
    }
}
