/**
 * DJC-Hub Sidebar Widgets - Mobile First
 * Glassmorphism cards, gaming-style quests, activity feed, friends.
 */

/* ============================================
   RIGHT SIDEBAR CONTAINER
   ============================================ */

/* ============================================
   RIGHT SIDEBAR - MIRRORS LEFT SIDEBAR EXACTLY
   Same padding, labels, separators, hover, font
   ============================================ */

/* Mobile-first: right sidebar flows full-width below content by default */
.djc-hub-right-sidebar {
    width: 100%;
    padding: 8px 0;
}

/* Large screens: sidebar width is controlled by shell-contract.css */
@media (min-width: 1200px) {
    .djc-hub-right-sidebar {
        width: auto;
        padding: 0;
    }
}

/* Widget = section block, no card styling - same as left sidebar nav sections */
.djc-hub-right-sidebar .djc-widget {
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    margin-bottom: 0;
}

.djc-hub-right-sidebar .djc-widget:last-child {
    border-bottom: none;
}

.djc-hub-right-sidebar .djc-widget:hover {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.07);
}

/* Section label - exact match with .djc-nav-section-label */
.djc-hub-right-sidebar .djc-widget-header {
    padding: 16px 20px 6px;
    margin-bottom: 0;
}

.djc-hub-right-sidebar .djc-widget-header h3,
.djc-hub-right-sidebar .djc-widget-header h3 i {
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: 1.2px !important;
    text-transform: uppercase !important;
    color: rgba(255, 255, 255, 0.5) !important;
    pointer-events: none;
    gap: 6px;
}

/* Widget body padding - same as nav item horizontal padding */
.djc-hub-right-sidebar .djc-widget-body {
    padding: 0 0 8px;
}

/* ---- QUEST ITEMS - styled as nav items ---- */
.djc-hub-right-sidebar .djc-quests-list {
    gap: 0;
    display: flex;
    flex-direction: column;
}

.djc-hub-right-sidebar .djc-quest-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 0 8px 8px 0;
    border-left: 3px solid transparent;
    margin: 1px 8px 1px 0;
    overflow: visible;
    cursor: pointer;
    transition: all 0.18s ease;
    min-height: 44px;
}

.djc-hub-right-sidebar .djc-quest-item:hover {
    background: rgba(124, 92, 255, 0.08);
    border-left-color: rgba(124, 92, 255, 0.4);
    transform: none;
}

.djc-hub-right-sidebar .djc-quest-item::before { display: none; }
.djc-hub-right-sidebar .djc-quest-icon { display: none; }
.djc-hub-right-sidebar .djc-quest-top { flex: 1; min-width: 0; gap: 0; }
/* Show progress count but hide the bar graphic */
.djc-hub-right-sidebar .djc-quest-bar {
    display: flex;
    align-items: center;
    background: transparent;
    height: auto;
    margin-top: 2px;
}
.djc-hub-right-sidebar .djc-quest-fill { display: none; }
.djc-hub-right-sidebar .djc-quest-progress-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
}

/* Title - same as .djc-nav-label */
.djc-hub-right-sidebar .djc-quest-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
}

/* XP + Start on the right */
.djc-hub-right-sidebar .djc-quest-bottom {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 0;
}

/* ---- RECOMMENDATION ITEMS - styled as nav items ---- */
.djc-hub-right-sidebar .djc-recommendation-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.djc-hub-right-sidebar .djc-recommendation-item {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    border-left: 3px solid transparent;
    border-radius: 0 8px 8px 0;
    margin: 1px 8px 1px 0;
    transition: all 0.18s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.djc-hub-right-sidebar .djc-recommendation-item:hover {
    background: rgba(124, 92, 255, 0.08);
    border-left-color: rgba(124, 92, 255, 0.4);
    color: #fff;
    text-decoration: none;
}

.djc-hub-right-sidebar .djc-recommendation-empty {
    padding: 10px 20px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 8px;
}

.djc-hub-right-sidebar .djc-recommendation-empty i {
    color: #4ade80;
}

/* ---- VRIENDEN - styled as nav items ---- */
.djc-hub-right-sidebar .djc-friend-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: transparent;
    border-radius: 0 8px 8px 0;
    border-left: 3px solid transparent;
    margin: 1px 8px 1px 0;
    text-decoration: none;
    transition: all 0.18s ease;
    min-height: 44px;
    flex-direction: row;
}

.djc-hub-right-sidebar .djc-friend-mini:hover {
    background: rgba(124, 92, 255, 0.08);
    border-left-color: rgba(124, 92, 255, 0.4);
    transform: none;
    box-shadow: none;
}

.djc-hub-right-sidebar .djc-friend-mini img,
.djc-hub-right-sidebar .djc-friend-initial {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.djc-hub-right-sidebar .djc-friend-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: none;
}

/* ---- EXPLORER PROGRESS ---- */
.djc-hub-right-sidebar .djc-explorer-progress-row {
    padding: 4px 20px;
}

/* ---- GENERAL TEXT ---- */
.djc-hub-right-sidebar .djc-activity-text,
.djc-hub-right-sidebar .djc-activity-time,
.djc-hub-right-sidebar p {
    color: rgba(255, 255, 255, 0.8);
}

/* Section divider */
.djc-hub-right-sidebar .djc-widget-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    margin: 4px 0;
}

/* ============================================
   BASE WIDGET CARD (glassmorphism)
   ============================================ */

.djc-widget {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.85), rgba(15, 23, 42, 0.85));
    border: 1px solid rgba(124, 92, 255, 0.18);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.2s ease;
}

.djc-widget:hover {
    border-color: rgba(124, 92, 255, 0.3);
}

.djc-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 8px;
}

.djc-widget-header h3 {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.djc-widget-header h3 i {
    font-size: 14px;
    color: rgba(124, 92, 255, 0.9);
}

.djc-widget-badge {
    background: #ef4444;
    color: #fff;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.djc-widget-btn {
    width: 100%;
    padding: 9px 14px;
    background: rgba(124, 92, 255, 0.12);
    border: 1px solid rgba(124, 92, 255, 0.25);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: center;
    margin-top: 10px;
}

.djc-widget-btn:hover {
    background: rgba(124, 92, 255, 0.22);
    border-color: rgba(124, 92, 255, 0.45);
    color: #fff;
}

/* ============================================
   EXPLORER WIDGET
   ============================================ */

.djc-explorer-progress-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.djc-explorer-progress-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

.djc-explorer-progress-value {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 700;
}

.djc-explorer-progress-bar {
    height: 6px !important;
    margin-bottom: 0 !important;
}

.djc-explorer-secret-hint {
    margin-top: 10px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.4;
    border-left: 2px solid rgba(124, 92, 255, 0.3);
    padding-left: 8px;
}

/* ============================================
   RECOMMENDATION WIDGET
   ============================================ */

.djc-recommendation-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.djc-recommendation-empty {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    padding: 4px 0;
}

.djc-recommendation-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    font-weight: 600;
    transition: all 0.18s ease;
}

.djc-recommendation-item:hover {
    background: rgba(124, 92, 255, 0.1);
    border-color: rgba(124, 92, 255, 0.25);
    color: #fff;
    transform: translateX(3px);
}

/* ============================================
   GAMING-STYLE DAILY QUESTS
   ============================================ */

.djc-quests-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.djc-quest-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.07), rgba(139, 92, 246, 0.07));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    transition: all 0.22s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.djc-quest-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.djc-quest-item:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.13), rgba(139, 92, 246, 0.13));
    transform: translateY(-1px);
}

.djc-quest-item:hover::before { opacity: 1; }

.djc-quest-item.completed {
    border-color: rgba(34, 197, 94, 0.25);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.06), rgba(16, 185, 129, 0.06));
    opacity: 0.8;
}

.djc-quest-item.completed::before {
    background: linear-gradient(180deg, #22c55e, #10b981);
    opacity: 1;
}

.djc-quest-item.is-attention {
    border-color: rgba(251, 191, 36, 0.35);
    animation: quest-attention 3s ease-in-out infinite;
}

@keyframes quest-attention {
    0%, 100% { border-color: rgba(251, 191, 36, 0.35); }
    50%       { border-color: rgba(251, 191, 36, 0.65); box-shadow: 0 0 12px rgba(251, 191, 36, 0.2); }
}

.djc-quest-top {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.djc-quest-icon {
    width: 38px;
    height: 38px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    transition: all 0.18s ease;
}

.djc-quest-item:hover .djc-quest-icon {
    background: rgba(99, 102, 241, 0.25);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
}

.djc-quest-item.completed .djc-quest-icon {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
}

.djc-quest-content {
    flex: 1;
    min-width: 0;
}

.djc-quest-title {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.3;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.djc-quest-bar {
    position: relative;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 2px;
}

.djc-quest-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 999px;
    transition: width 0.4s ease;
    box-shadow: 0 0 6px rgba(99, 102, 241, 0.5);
}

.djc-quest-item.completed .djc-quest-fill {
    background: linear-gradient(90deg, #22c55e, #10b981);
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.djc-quest-progress-text {
    position: absolute;
    right: 0;
    top: -16px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 600;
}

.djc-quest-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.djc-quest-reward {
    font-size: 12px;
    font-weight: 800;
    color: #fbbf24;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    padding: 3px 8px;
    border-radius: 999px;
}

.djc-quest-actions { display: flex; gap: 6px; }

.djc-quest-start,
.djc-quest-checkin {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    border-radius: 999px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.djc-quest-start:hover,
.djc-quest-checkin:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
    color: #fff;
}

.djc-quest-done {
    font-size: 11px;
    font-weight: 700;
    color: #22c55e;
}

.djc-quest-coming-soon {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.06);
    padding: 3px 8px;
    border-radius: 999px;
}

.djc-quest-timer {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ============================================
   ACTIVITY FEED
   ============================================ */

.djc-activity-feed {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.djc-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: background 0.18s ease;
}

.djc-activity-item:hover { background: rgba(255, 255, 255, 0.06); }

.djc-activity-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1.5px solid rgba(124, 92, 255, 0.3);
}

.djc-activity-content {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.7);
}

.djc-activity-content strong { color: rgba(255, 255, 255, 0.92); font-weight: 700; }

.djc-activity-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 3px;
    white-space: nowrap;
}

/* ============================================
   FRIENDS WIDGET
   ============================================ */

.djc-friends-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.djc-friend-mini {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(124, 92, 255, 0.3);
    transition: all 0.18s ease;
    display: block;
    flex-shrink: 0;
}

.djc-friend-mini:hover {
    border-color: var(--djc-primary, #7c5cff);
    box-shadow: 0 0 10px rgba(124, 92, 255, 0.35);
    transform: scale(1.08);
}

.djc-friend-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.djc-friend-initial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7c5cff, #b45bff);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
}

/* ============================================
   GUEST PROMO
   ============================================ */

.djc-guest-promo {
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.1), rgba(180, 91, 255, 0.08));
    border-color: rgba(124, 92, 255, 0.25);
}

.djc-guest-promo-body p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.55;
    margin-bottom: 14px;
}

.djc-guest-promo-logos {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.djc-guest-promo-logo {
    font-size: 13px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.07);
    padding: 4px 10px;
    border-radius: 6px;
}

.djc-guest-promo-divider {
    width: 20px;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.djc-guest-promo-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ============================================
   SHARED BUTTONS
   ============================================ */

.djc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

.djc-btn-primary {
    background: linear-gradient(135deg, #7c5cff, #b45bff);
    color: #fff;
    box-shadow: 0 2px 10px rgba(124, 92, 255, 0.3);
}

.djc-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(124, 92, 255, 0.45);
    color: #fff;
}

.djc-btn-outline {
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    border-color: rgba(255, 255, 255, 0.2);
}

.djc-btn-outline:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

/* Right sidebar positioning handled by shell-contract.css */
