/* Quick Pings Module Styles */

/* ===== Floating Action Button (FAB) ===== */
.pings-fab {
    position: fixed;
    bottom: 80px; /* Above timer status bar */
    right: 20px;
    z-index: 1040;
}

.pings-fab-btn {
    width: 56px;
    height: 56px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: transform 0.2s ease;
    position: relative;
}

.pings-fab-btn:hover {
    transform: scale(1.1);
}

.pings-fab-btn:active {
    transform: scale(0.95);
}

.pings-fab-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    animation: pulse 2s infinite;
}

/* ===== Drawer Styling ===== */
#pingsDrawer {
    width: 400px;
    max-width: 100vw;
    background: var(--surface);
    border-left: 1px solid var(--border);
}

.pings-drawer-header {
    background: var(--glass-bg);
    border-bottom: 1px solid var(--border);
}

.pings-drawer-header .offcanvas-title {
    color: var(--text);
}

.pings-tabs-container {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.pings-tabs-container .nav-pills .nav-link {
    background: var(--bg);
    color: var(--text-muted);
    border: 1px solid var(--border);
    font-size: 13px;
    padding: 8px 12px;
}

.pings-tabs-container .nav-pills .nav-link.active {
    background: var(--primary);
    color: var(--bg);
    border-color: var(--primary);
}

.pings-tabs-container .nav-pills .nav-link:hover:not(.active) {
    background: var(--surface-hover);
    color: var(--text);
}

.pings-body {
    padding: 16px;
    overflow-y: auto;
}

.pings-drawer-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    background: var(--glass-bg);
}

/* ===== Ping List Items ===== */
.ping-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ping-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    transition: all 0.2s ease;
}

.ping-item:hover {
    border-color: var(--primary);
}

.ping-item.unread {
    border-left: 3px solid var(--primary);
    background: rgba(0, 217, 255, 0.03);
}

.ping-item.stale {
    border-left: 3px solid var(--warning);
    background: rgba(210, 153, 34, 0.05);
}

.ping-item-content {
    font-size: 14px;
    color: var(--text);
    margin-bottom: 8px;
    word-break: break-word;
    line-height: 1.5;
}

.ping-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 4px;
}

.ping-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.ping-item-actions .btn {
    padding: 4px 10px;
    font-size: 12px;
}

/* ===== Context Badge ===== */
.ping-context-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    background: var(--surface-hover);
    color: var(--text-muted);
    margin-top: 8px;
}

.ping-context-badge i {
    margin-right: 4px;
    font-size: 10px;
}

/* ===== Stale Badge ===== */
.ping-stale-badge {
    font-size: 10px;
    padding: 2px 6px;
    background: var(--warning);
    color: var(--bg);
    border-radius: 4px;
    font-weight: 600;
}

/* ===== Animations ===== */
.ping-item.resolving {
    animation: resolveSlide 0.3s ease forwards;
}

@keyframes resolveSlide {
    to {
        opacity: 0;
        transform: translateX(100%);
        height: 0;
        padding: 0;
        margin: 0;
        border: 0;
    }
}

.ping-item.nudging {
    animation: nudgeShake 0.5s ease;
}

@keyframes nudgeShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

/* ===== @Mention Styling ===== */
.mention-highlight {
    background: var(--mention-bg);
    color: var(--mention-fg);
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 500;
}

/* ===== Autocomplete Dropdown ===== */
.mention-autocomplete {
    position: absolute;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1060;
    width: 100%;
    margin-top: 4px;
}

.mention-autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
}

.mention-autocomplete-item:last-child {
    border-bottom: none;
}

.mention-autocomplete-item:hover,
.mention-autocomplete-item.selected {
    background: var(--surface-hover);
}

.mention-autocomplete-item img,
.mention-autocomplete-item .mention-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.mention-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--bg);
    font-weight: 600;
    font-size: 14px;
}

.mention-user-info {
    flex: 1;
}

.mention-user-name {
    font-weight: 500;
    color: var(--text);
    font-size: 13px;
}

.mention-user-email {
    font-size: 11px;
    color: var(--text-muted);
}

/* ===== Modal Styling ===== */
.ping-modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
}

.ping-modal-content .modal-header {
    background: var(--glass-bg);
    border-bottom: 1px solid var(--border);
}

.ping-modal-content .modal-footer {
    background: var(--glass-bg);
    border-top: 1px solid var(--border);
}

.ping-modal-content .form-control,
.ping-modal-content .form-select {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
}

.ping-modal-content .form-control:focus,
.ping-modal-content .form-select:focus {
    background: var(--bg);
    border-color: var(--primary);
    color: var(--text);
}

.ping-modal-content .form-control::placeholder {
    color: var(--text-muted);
}

.ping-modal-content .form-label {
    color: var(--text);
    font-weight: 500;
    font-size: 13px;
}

.ping-textarea {
    resize: none;
    min-height: 80px;
}

.ping-input-wrapper {
    position: relative;
}

.ping-context-info {
    padding: 8px 12px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* ===== Empty States ===== */
.ping-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.ping-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.ping-empty p {
    margin: 0;
    font-size: 14px;
}

/* ===== Loading State ===== */
.ping-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

/* ===== Responsive ===== */
@media (max-width: 576px) {
    #pingsDrawer {
        width: 100vw;
    }

    .pings-fab {
        bottom: 70px;
        right: 16px;
    }

    .pings-fab-btn {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }

    .ping-item-actions {
        flex-direction: column;
    }

    .ping-item-actions .btn {
        width: 100%;
    }
}

/* ===== Keyboard Shortcut Hint ===== */
.pings-fab::after {
    content: 'Ctrl+K';
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.pings-fab:hover::after {
    opacity: 1;
}

/* ===== Status Colors ===== */
.ping-status-active {
    color: var(--primary);
}

.ping-status-resolved {
    color: var(--success);
}

.ping-status-archived {
    color: var(--text-muted);
}

.ping-status-escalated {
    color: var(--warning);
}

/* ===== Nudge Counter ===== */
.ping-nudge-count {
    font-size: 10px;
    color: var(--text-muted);
    margin-left: 4px;
}

/* ===== Escalated Link ===== */
.ping-escalated-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--warning);
    font-size: 12px;
    text-decoration: none;
}

.ping-escalated-link:hover {
    color: var(--primary);
    text-decoration: underline;
}
