/* ==========================================================================
   REVOnet Views — revonet-views.css
   © Newdeal Deluxe IKE 2026
   --------------------------------------------------------------------------
   Pairs with the view overrides in overrides/. Markup contracts assumed:
     - .rn-people-card      : people-card wrapper (peopleCard.php override)
     - .rn-space-card       : space-card wrapper (spaceDirectoryCard.php override)
     - .rn-user-acronym     : colored-initials avatar div
     - .rn-user-acronym-link: anchor wrapping the avatar
     - .rn-space-member-count: member-count chip on space cards
     - .rn-space-activity   : last-activity timestamp on space cards
     - .rn-people-details   : profile-field details container
     - .rn-people-tags      : profile tags container

   Pattern: every selector here is .rn-* prefixed or scoped under .rn-* parent
   so we don't accidentally style other HumHub widgets.
   ========================================================================== */


/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ 1. USER COLORED-INITIALS AVATAR                                        ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

.rn-user-acronym {
    /* Inline width/height/font-size set by PHP; here only the cosmetic stuff */
    color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    user-select: none;
    box-shadow:
        inset 0 -3px 8px rgba(0, 0, 0, 0.10),
        0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    border: 3px solid #ffffff;
}

.rn-user-acronym span {
    line-height: 1;
    pointer-events: none;
}

.rn-user-acronym-link {
    display: inline-block;
    text-decoration: none;
}

.rn-user-acronym-link:hover .rn-user-acronym {
    transform: scale(1.04);
    box-shadow:
        inset 0 -3px 8px rgba(0, 0, 0, 0.10),
        0 4px 14px rgba(0, 0, 0, 0.15);
}


/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ 2. PEOPLE CARDS — enhanced layout                                      ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

.rn-people-card {
    transition: transform 0.18s ease, box-shadow 0.22s ease;
    border-radius: 12px;
    overflow: hidden;
}

.rn-people-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}

.rn-people-card .card-subtitle {
    font-size: 12.5px;
    color: #6B7280;
    margin-top: 2px;
    margin-bottom: 4px;
    font-weight: 500;
}

/* Profile field details rendered as soft pill chips, not <br>-separated text */
.rn-people-details {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    line-height: 1.2;
}

.rn-people-details .rn-detail-line {
    display: inline-block;
    background: #F3F4F6;
    color: #4B5563;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 500;
    border: 1px solid #E5E7EB;
}

/* The first line (the natural <span> wrap from PeopleDetails widget output)
   needs the same chip treatment. Our PHP feeds the inline <span> chain via
   a special separator: '</span><span class="rn-detail-line">' */
.rn-people-details {
    /* Reset any default block layout from PeopleDetails widget */
}
.rn-people-details > * {
    display: inline-block;
    background: #F3F4F6;
    color: #4B5563;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 500;
    border: 1px solid #E5E7EB;
}

/* People tags row */
.rn-people-tags {
    margin-top: 8px;
}


/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ 3. SPACE CARDS — enhanced with member count + activity                 ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

.rn-space-card {
    position: relative;
    transition: transform 0.18s ease, box-shadow 0.22s ease;
    border-radius: 12px;
    overflow: hidden;
}

.rn-space-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}

/* Member count chip — positioned top-right over the banner */
.rn-space-member-count {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    background: rgba(255, 255, 255, 0.95);
    color: #1F2937;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.rn-space-member-count i {
    font-size: 11px;
    color: #6B7280;
}

/* Last-activity row, below tags, very subtle */
.rn-space-activity {
    margin-top: 10px;
    color: #9CA3AF;
    font-size: 11.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rn-space-activity i {
    font-size: 11px;
}


/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ 4. RESPONSIVE TWEAKS                                                   ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

@media (max-width: 768px) {
    .rn-user-acronym {
        border-width: 2px;
    }

    .rn-space-member-count {
        top: 8px;
        right: 8px;
        padding: 3px 8px;
        font-size: 11px;
    }

    .rn-people-details > *,
    .rn-people-details .rn-detail-line {
        font-size: 11px;
        padding: 2px 7px;
    }
}


/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ 5. BROKER PROFILE PILLS (v1.1.0)                                       ║
   ╚══════════════════════════════════════════════════════════════════════╝
   Domain-specific chip badges shown on each people card. Each pill type
   has its own background tint matching its semantic meaning. */

.rn-broker-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    margin-bottom: 4px;
    line-height: 1.2;
}

.rn-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: transform 0.15s ease;
    user-select: none;
}

.rn-pill-icon {
    font-size: 11px;
    opacity: 0.9;
}

.rn-pill-value {
    line-height: 1;
}

/* AM Verified — special green/blue treatment with check icon */
.rn-pill-am {
    background: linear-gradient(135deg, #DBEAFE, #BFDBFE);
    color: #1E40AF;
    border-color: #93C5FD;
    font-weight: 600;
}
.rn-pill-am .rn-pill-icon {
    color: #2563EB;
}
.rn-pill-verified-icon {
    color: #10B981;
    font-size: 12px;
    margin-left: 2px;
}

/* Region — neutral grey-blue */
.rn-pill-region {
    background: #F3F4F6;
    color: #4B5563;
    border-color: #E5E7EB;
}
.rn-pill-region .rn-pill-icon {
    color: #6B7280;
}

/* Specialization — emerald tint */
.rn-pill-spec {
    background: #D1FAE5;
    color: #065F46;
    border-color: #A7F3D0;
}
.rn-pill-spec .rn-pill-icon {
    color: #059669;
}

/* Language — amber tint */
.rn-pill-lang {
    background: #FEF3C7;
    color: #78350F;
    border-color: #FDE68A;
}
.rn-pill-lang .rn-pill-icon {
    color: #D97706;
}

/* Year started / experience — purple tint */
.rn-pill-year {
    background: #EDE9FE;
    color: #5B21B6;
    border-color: #DDD6FE;
}
.rn-pill-year .rn-pill-icon {
    color: #7C3AED;
}


/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ 6. BROKER FILTER PANEL (v1.1.0)                                        ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

.rn-broker-filter-panel {
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    margin-bottom: 16px;
    background: #FFFFFF;
}

.rn-broker-filter-panel .panel-body {
    padding: 16px 20px;
}

.rn-filter-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: #374151;
    font-size: 14px;
}

.rn-filter-header > i.fa {
    color: #3B82F6;
    font-size: 13px;
}

.rn-filter-count {
    margin-left: auto;
    color: #6B7280;
    font-size: 12.5px;
    font-weight: 500;
    padding: 2px 10px;
    background: #F3F4F6;
    border-radius: 12px;
}

.rn-filter-reset {
    color: #6B7280;
    font-size: 12px;
    text-decoration: none;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}
.rn-filter-reset:hover {
    color: #DC2626;
    background: #FEE2E2;
    text-decoration: none;
}
.rn-filter-reset i {
    font-size: 10px;
    margin-right: 2px;
}

.rn-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    align-items: end;
}

.rn-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rn-filter-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}
.rn-filter-label i {
    color: #9CA3AF;
    font-size: 11px;
}

.rn-filter-select {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 13px;
    color: #374151;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}
.rn-filter-select:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: #FFFFFF;
}

.rn-filter-am-toggle-wrap {
    align-self: end;
}

.rn-filter-am-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin: 0;
    padding: 8px 12px;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 8px;
    transition: background 0.15s ease;
    font-size: 12.5px;
    font-weight: 500;
    color: #15803D;
}
.rn-filter-am-toggle:hover {
    background: #DCFCE7;
}

.rn-filter-am-toggle input[type="checkbox"] {
    accent-color: #10B981;
    margin: 0;
    cursor: pointer;
}

.rn-filter-am-toggle .fa-check-circle {
    color: #10B981;
    font-size: 13px;
}


/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ 7. NO-RESULTS STATE                                                    ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

.rn-no-results-msg .panel {
    border: 1px dashed #D1D5DB;
    background: #F9FAFB;
}

.rn-no-results-msg .panel-body {
    padding: 36px 20px;
}

.rn-no-results-icon {
    font-size: 36px;
    color: #D1D5DB;
    margin-bottom: 8px;
    display: block;
}

.rn-no-results-msg h4 {
    color: #6B7280;
    margin: 8px 0 4px;
    font-weight: 600;
}

.rn-no-results-msg p {
    color: #9CA3AF;
    margin: 0;
}


/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ 8. RESPONSIVE TWEAKS for new components                                ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

@media (max-width: 768px) {
    .rn-filter-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .rn-filter-header {
        flex-wrap: wrap;
    }

    .rn-filter-count {
        margin-left: 0;
    }

    .rn-pill {
        font-size: 11px;
        padding: 3px 8px;
    }
}


/* ╔══════════════════════════════════════════════════════════════════════╗
   ║ 9. v1.1.1 FIXES                                                        ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

/* Force-strip browser default chevron from <select>, replace with custom SVG.
   Without appearance:none, some browsers + parent CSS interactions cause
   stacked/duplicated chevrons (the "spam" issue from v1.1.0). */
select.rn-filter-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236B7280'%3e%3cpath d='M8 11.5a.75.75 0 0 1-.53-.22l-4-4a.75.75 0 0 1 1.06-1.06L8 9.69l3.47-3.47a.75.75 0 0 1 1.06 1.06l-4 4a.75.75 0 0 1-.53.22z'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 14px !important;
    background-color: #F9FAFB !important;
    padding-right: 32px !important;
    text-overflow: ellipsis;
}
select.rn-filter-select::-ms-expand {
    display: none !important;
}

/* VOO Status pill — distinctive purple/indigo for the platform-specific badge */
.rn-pill-voo {
    background: linear-gradient(135deg, #E0E7FF, #C7D2FE);
    color: #3730A3;
    border-color: #A5B4FC;
    font-weight: 600;
}
.rn-pill-voo .rn-pill-icon {
    color: #4F46E5;
}

/* Hide HumHub user tags on /people cards (ADMINISTRATION, SUPPORT, etc.)
   They were cluttering the broker cards with platform-role indicators
   that aren't relevant to the broker-network demo. */
.rn-people-card .rn-people-tags {
    display: none;
}

/* Tighten the spacing slightly when there are many pills */
.rn-broker-pills {
    margin-top: 8px;
}
