/**
 * OSRS-Style Context Menu System
 * Right-click context menus with OSRS styling
 */

/* Context Menu Container */
.osrs-context-menu {
    position: fixed;
    z-index: 99999;
    min-width: 150px;
    max-width: 250px;
    background: #3e3529;
    border: 2px solid #0d0c0a;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-family: 'RuneScape Small', sans-serif;
    font-size: 14px;
    display: none;
    padding: 2px 0;
}

.osrs-context-menu.show {
    display: block;
    animation: osrs-menu-fade 0.1s ease-out;
}

@keyframes osrs-menu-fade {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Menu Header (shows target name) */
.osrs-context-menu-header {
    padding: 3px 8px;
    color: #ff981f;
    font-weight: bold;
    border-bottom: 1px solid #0d0c0a;
    background: #2d2820;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Menu Options */
.osrs-context-menu-option {
    padding: 2px 8px;
    color: #ffffff;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.osrs-context-menu-option:hover {
    background: #4a4032;
}

/* Option with action name highlighted */
.osrs-context-menu-option .action {
    color: #ff981f;
}

/* Option target (item/npc name) */
.osrs-context-menu-option .target {
    color: #00ffff;
}

/* Option with level requirement */
.osrs-context-menu-option .level {
    color: #00ff00;
    font-size: 12px;
}

.osrs-context-menu-option .level.locked {
    color: #ff0000;
}

/* Separator line */
.osrs-context-menu-separator {
    height: 1px;
    background: #0d0c0a;
    margin: 2px 0;
}

/* Examine option (always at bottom, different color) */
.osrs-context-menu-option.examine {
    color: #999999;
}

.osrs-context-menu-option.examine:hover {
    color: #ffffff;
}

/* Cancel option */
.osrs-context-menu-option.cancel {
    color: #ff6666;
}

/* Disabled option */
.osrs-context-menu-option.disabled {
    color: #666666;
    cursor: not-allowed;
}

.osrs-context-menu-option.disabled:hover {
    background: transparent;
}

/* Option icons */
.osrs-context-menu-option i {
    width: 16px;
    text-align: center;
    font-size: 12px;
}

/* Option with item icon preview */
.osrs-context-menu-option img {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

/* Sub-option indentation (for nested menus) */
.osrs-context-menu-option.sub {
    padding-left: 20px;
}

/* Quantity badge */
.osrs-context-menu-qty {
    margin-left: auto;
    color: #ffff00;
    font-size: 11px;
}

/* Walk here option (always green) */
.osrs-context-menu-option.walk-here .action {
    color: #00ff00;
}

/* Attack option (red for hostile) */
.osrs-context-menu-option.attack .action {
    color: #ff0000;
}

/* Trade option */
.osrs-context-menu-option.trade .action {
    color: #00ffff;
}

/* Use option */
.osrs-context-menu-option.use .action {
    color: #ffff00;
}

/* Drop option */
.osrs-context-menu-option.drop .action {
    color: #ff9900;
}

/* Shift-click indicator */
.osrs-context-menu-shift-indicator {
    display: none;
    position: absolute;
    top: -20px;
    left: 0;
    background: rgba(0,0,0,0.8);
    color: #ffff00;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 2px;
}

.osrs-context-menu.shift-mode .osrs-context-menu-shift-indicator {
    display: block;
}

/* Mobile-friendly adjustments */
@media (max-width: 768px) {
    .osrs-context-menu {
        font-size: 16px;
        min-width: 180px;
    }

    .osrs-context-menu-option {
        padding: 8px 12px;
    }
}

/* =========================================================================
   OSRS Use Mode Styles
   ========================================================================= */

/* Body class when in use mode */
body.osrs-use-mode {
    cursor: crosshair;
}

/* Item selected for "Use" interaction */
.inven.use-mode {
    box-shadow: 0 0 8px 2px #ffff00 !important;
    border-color: #ffff00 !important;
}

.inven.use-mode img {
    filter: brightness(1.2) drop-shadow(0 0 3px #ffff00);
}

/* Use mode indicator */
#osrsUseIndicator {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: #3e3529;
    border: 2px solid #0d0c0a;
    color: #ffff00;
    padding: 5px 15px;
    z-index: 99998;
    font-family: 'RuneScape Small', sans-serif;
    font-size: 14px;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* =========================================================================
   Prayer Orb Active State
   ========================================================================= */

.rs-ab-prayer-orb.active {
    cursor: pointer;
}

.rs-ab-prayer-orb.active .rs-ab-orb-container {
    box-shadow: 0 0 10px 3px rgba(255, 215, 0, 0.6);
    animation: prayer-pulse 1.5s ease-in-out infinite;
}

.rs-ab-prayer-orb.active .rs-ab-orb-icon {
    color: #ffd700;
    text-shadow: 0 0 5px #ffd700;
}

@keyframes prayer-pulse {
    0%, 100% { box-shadow: 0 0 10px 3px rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 0 15px 5px rgba(255, 215, 0, 0.7); }
}

/* Orb click cursor */
.rs-ab-prayer-orb {
    cursor: pointer;
}

/* =========================================================================
   Inventory Item Hover Effects
   ========================================================================= */

.inven:hover {
    cursor: pointer;
}

/* Equipment slot hover */
.equip:hover {
    cursor: pointer;
}

/* Chat username right-click indicator */
.chat-username {
    cursor: context-menu;
}

.chat-username:hover {
    text-decoration: underline;
}
