/**
 * /assets/css/invitations.css
 *
 * Purpose:  Styles for notification bell, invitation cards, friend chips
 * Deps:     app.css (variables)
 * Load:     index.php
 * Version:  1.2.0 – Discovery notification styles (6 types)
 */

/* ============================================================================
   NOTIFICATION BELL (Header)
   ============================================================================ */

.header-notif-wrap {
    position: relative;
}

.header-notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    color: #fff;
    background: var(--danger, #ff6b6b);
    border-radius: 8px;
    pointer-events: none;
}

.header-notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    max-height: 420px;
    background: rgba(20, 25, 35, .97);
    backdrop-filter: blur(12px) saturate(1.3);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
    z-index: 1060;
    overflow: hidden;
}

.header-notif-dropdown__header {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .85);
}

.header-notif-dropdown__list {
    overflow-y: auto;
    max-height: 360px;
}

.header-notif-dropdown__list::-webkit-scrollbar {
    width: 4px;
}

.header-notif-dropdown__list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .1);
    border-radius: 2px;
}

/* Notification item */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .04);
    transition: background .15s;
}

.notif-item:hover {
    background: rgba(255, 255, 255, .03);
}

.notif-item__icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.notif-item__icon--world {
    background: rgba(77, 163, 255, .15);
    border: 1px solid rgba(77, 163, 255, .25);
    color: var(--exp, #4da3ff);
}

.notif-item__icon--friend {
    background: rgba(176, 140, 255, .15);
    border: 1px solid rgba(176, 140, 255, .25);
    color: rgba(176, 140, 255, .9);
}

.notif-item__icon--migration {
    background: rgba(255, 211, 107, .15);
    border: 1px solid rgba(255, 211, 107, .25);
    color: var(--gold, #ffd36b);
}

/* Discovery types */
.notif-item__icon--disc-location {
    background: rgba(23, 162, 184, .15);
    border: 1px solid rgba(23, 162, 184, .25);
    color: #17a2b8;
}

.notif-item__icon--disc-monster {
    background: rgba(220, 53, 69, .15);
    border: 1px solid rgba(220, 53, 69, .25);
    color: #dc3545;
}

.notif-item__icon--disc-npc {
    background: rgba(32, 201, 151, .15);
    border: 1px solid rgba(32, 201, 151, .25);
    color: #20c997;
}

.notif-item__icon--disc-faction {
    background: rgba(255, 193, 7, .15);
    border: 1px solid rgba(255, 193, 7, .25);
    color: var(--gold, #ffc107);
}

.notif-item__icon--disc-quest {
    background: rgba(77, 163, 255, .15);
    border: 1px solid rgba(77, 163, 255, .25);
    color: var(--exp, #4da3ff);
}

.notif-item__icon--disc-map {
    background: rgba(93, 214, 201, .15);
    border: 1px solid rgba(93, 214, 201, .25);
    color: var(--accent, #5dd6c9);
}

.notif-item__disc-link {
    text-decoration: none;
    color: rgba(255, 255, 255, .75);
    display: block;
}

.notif-item__disc-link:hover {
    color: rgba(255, 255, 255, .95);
}

.notif-item--discovery {
    border-left: 3px solid rgba(93, 214, 201, .3);
}

.notif-item--discovery:hover {
    border-left-color: rgba(93, 214, 201, .6);
    background: rgba(93, 214, 201, .04);
}

a.notif-item--link {
    text-decoration: none;
    cursor: pointer;
    border-left: 3px solid rgba(255, 211, 107, .4);
}

a.notif-item--link:hover {
    background: rgba(255, 211, 107, .06);
    border-left-color: rgba(255, 211, 107, .7);
}

.notif-item__icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.notif-item__body {
    flex: 1;
    min-width: 0;
}

.notif-item__text {
    font-size: 12px;
    color: rgba(255, 255, 255, .75);
    line-height: 1.3;
    margin-bottom: 4px;
}

.notif-item__text strong {
    color: rgba(255, 255, 255, .95);
}

.notif-item__date {
    font-size: 10px;
    color: rgba(255, 255, 255, .3);
}

.notif-item__actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    align-self: center;
}

.notif-item__actions .btn {
    padding: 2px 8px;
    font-size: 11px;
}

.notif-empty {
    text-align: center;
    padding: 24px 14px;
    color: rgba(255, 255, 255, .35);
    font-size: 13px;
}

.notif-empty i {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
    opacity: .4;
}

/* ============================================================================
   INVITATION CARDS (Homepage)
   ============================================================================ */

.invite-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, .02);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, .06);
    border-left: 3px solid rgba(255, 211, 107, .4);
    border-radius: 10px;
    transition: border-color .2s, box-shadow .2s;
}

.invite-card:hover {
    border-color: rgba(255, 211, 107, .6);
    box-shadow: 0 4px 16px rgba(255, 211, 107, .08);
}

.invite-card__icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 211, 107, .1);
    border: 1px solid rgba(255, 211, 107, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    overflow: hidden;
}

.invite-card__world-img,
.invite-card__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.invite-card__avatar-initials {
    font-size: 16px;
    font-weight: 800;
    color: rgba(255, 255, 255, .7);
}

.invite-card__content {
    flex: 1;
    min-width: 0;
}

.invite-card__title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--gold, #ffd36b);
    margin-bottom: 2px;
}

.invite-card__desc {
    font-size: 13px;
    color: rgba(255, 255, 255, .75);
    line-height: 1.3;
}

.invite-card__desc strong {
    color: rgba(255, 255, 255, .95);
}

.invite-card__date {
    font-size: 10px;
    color: rgba(255, 255, 255, .3);
    margin-top: 2px;
}

.invite-card__actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* ============================================================================
   FRIEND CHIPS (Player Profile)
   ============================================================================ */

.friend-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 4px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 20px;
    transition: border-color .2s, background .2s;
    color: rgba(255, 255, 255, .8);
    font-size: 13px;
}

.friend-chip:hover {
    border-color: rgba(176, 140, 255, .4);
    background: rgba(176, 140, 255, .08);
    color: rgba(255, 255, 255, .95);
}

.friend-chip__avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.friend-chip__initial {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(93, 214, 201, .3), rgba(176, 140, 255, .3));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: rgba(255, 255, 255, .7);
}

.friend-chip__name {
    white-space: nowrap;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 576px) {
    .header-notif-dropdown {
        width: 300px;
        right: -40px;
    }

    .invite-card {
        flex-wrap: wrap;
    }

    .invite-card__actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 4px;
    }
}

/* ============================================================================
   REDUCED MOTION
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    .invite-card,
    .friend-chip,
    .notif-item,
    .header-notif-badge {
        transition: none;
    }
}
