/* ==============================================
   Member Directory & Member Profile Styles
   ============================================== */

/* --- Member list toolbar --- */
.member-list-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 10px;
}

.member-list-count {
    font-weight: 600;
    color: #333;
}

.member-search-box {
    min-width: 220px;
    flex: 1;
    max-width: 320px;
}

.member-avatar {
    object-fit: cover;
    height: 80px;
    width: 80px;
    border-radius: 4px;
}

.member-show-btn {
    white-space: nowrap;
}

/* ==============================================
   Member Profile - Redesigned Layout
   ============================================== */
.member-profile-area {
    padding-bottom: 40px;
}

.member-profile-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

/* Cover banner */
.member-cover {
    height: 130px;
    background: linear-gradient(135deg, #1e6091 0%, #159895 55%, #1b998b 100%);
    position: relative;
}

.member-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.18), transparent 55%);
}

.member-card-body {
    padding-top: 0;
}

/* Photo */
.member-photo-col {
    margin-top: -75px;
}

.member-photo-frame {
    display: inline-block;
    padding: 5px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.member-profile-image {
    width: 170px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* Name + badges */
.member-heading-col {
    padding-top: 15px;
}

.member-profile-name {
    font-size: 24px;
    font-weight: 700;
    color: #1a2b3c;
    margin: 0 0 8px;
}

.member-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.member-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.member-badge i {
    font-size: 13px;
}

.member-badge--lin {
    background: #e8f1fa;
    color: #1e6091;
}

.member-badge--blood {
    background: #fdecea;
    color: #b02a37;
}

.member-badge--active {
    background: #e6f7ed;
    color: #157347;
}

.member-badge--inactive {
    background: #fdecea;
    color: #b02a37;
}

/* Quick actions */
.member-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.member-quick-actions .btn {
    border-radius: 20px;
    font-weight: 600;
}

/* Info cards */
.member-info-card {
    border: none;
    border-radius: 10px;
    margin-top: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.member-card-header {
    background: #f7f9fb;
    border-bottom: 1px solid #eceff1;
    border-radius: 10px 10px 0 0 !important;
    padding: 12px 18px;
}

.member-section-title {
    font-weight: 700;
    color: #1a2b3c;
    font-size: 16px;
}

.member-section-title i {
    margin-right: 6px;
    color: #159895;
}

.member-info-grid {
    margin: 0;
}

.member-info-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 14px;
    border: 1px solid #eef1f4;
    border-radius: 8px;
    margin: 0 0 12px;
    background: #fff;
    min-height: 100%;
}

.member-info-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #7a8a99;
    display: flex;
    align-items: center;
    gap: 6px;
}

.member-info-label i {
    color: #159895;
    font-size: 13px;
}

.member-info-value {
    font-size: 15px;
    color: #22313f;
    font-weight: 500;
    word-break: break-word;
}

.member-info-value a {
    color: #1e6091;
    font-weight: 600;
}

/* --- Social share buttons --- */
.member-share-block {
    margin-top: 25px;
}

.member-share-note {
    font-size: 14px;
    margin-bottom: 14px;
}

.member-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.share-btn:hover,
.share-btn:focus {
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    opacity: 0.9;
}

.share-btn--facebook { background: #3b5998; }
.share-btn--twitter  { background: #000000; }
.share-btn--whatsapp { background: #25d366; }
.share-btn--linkedin { background: #0077b5; }
.share-btn--telegram { background: #0088cc; }
.share-btn--email    { background: #ea4335; }
.share-btn--copy     { background: #6c757d; }
.share-btn--native   { background: #17a2b8; }

.share-feedback {
    display: inline-block;
    margin-top: 8px;
    color: #28a745;
    font-size: 13px;
    font-weight: 600;
}

/* --- QR code --- */
.member-qr-block {
    margin-top: 25px;
}

.member-qr-card {
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    padding: 18px 15px;
    text-align: center;
    height: 100%;
    background: #fbfcfd;
}

.member-qr-card__title {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 14px;
    margin-bottom: 10px;
}

.member-qr-card__title i {
    margin-right: 4px;
}

.member-qr-card .btn {
    margin: 0 4px 4px;
}

.member-qr-code {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    min-height: 180px;
    background: #fff;
    border: 1px dashed #ddd;
    border-radius: 6px;
}

.member-qr-code img,
.member-qr-code canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.member-qr-hint {
    margin-top: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1.4;
    color: #6c757d;
}

/* --- Back button --- */
.member-back-btn {
    margin-top: 25px;
    border-radius: 25px;
    font-weight: 600;
    border: none;
    background: #1e6091;
}

.member-back-btn:hover,
.member-back-btn:focus {
    background: #164a71;
    color: #fff;
}

/* --- Responsive --- */
@media (max-width: 767.98px) {
    /* Member list */
    .member-list-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .member-search-box {
        max-width: none;
    }

    /* Member profile */
    .member-photo-col {
        margin-top: -60px;
    }

    .member-profile-image {
        width: 130px;
        height: 155px;
    }

    .member-heading-col {
        text-align: center;
    }

    .member-badges,
    .member-quick-actions {
        justify-content: center;
    }

    .member-cover {
        height: 100px;
    }
}

.member-table-loader { text-align:center; padding:40px 0; }
