/* ==========================================================================
   SGPI BLOOD FOUNDATION - DONOR PROFILE & SHARING SYSTEM STYLES
   File: css/donor-profile.css
   Theme: Consistent Light-Red Gradient & Soft Glassmorphism
   Scope: Strictly isolated to .donor-profile-* and .donor-share-*
   ========================================================================== */

/* --------------------------------------------------------------------------
   Donor Profile Page Wrapper
   -------------------------------------------------------------------------- */
.donor-profile-page {
    font-family: 'Hind Siliguri', sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 1.5rem 1rem 3rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    box-sizing: border-box;
    background: linear-gradient(135deg, #ffdde1 0%, #ee9ca7 50%, #e26a76 100%) fixed;
    background-size: cover;
    color: #1f2937;
}

.donor-profile-page::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35) 0%, transparent 60%);
    pointer-events: none;
}

.donor-profile-container {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* --------------------------------------------------------------------------
   Top Brand Header
   -------------------------------------------------------------------------- */
.donor-profile-header {
    background: rgba(255, 255, 255, 0.48) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.75) !important;
    border-radius: 20px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    box-shadow: 0 10px 30px rgba(179, 18, 23, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04), inset 0 1px 1px rgba(255, 255, 255, 0.9) !important;
}

.donor-profile-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
    min-width: 0;
    flex: 1;
}

.donor-profile-brand-logo {
    height: 38px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.donor-profile-brand-text {
    min-width: 0;
    flex: 1;
}

.donor-profile-brand-title {
    font-size: clamp(0.92rem, 3.8vw, 1.15rem);
    font-weight: 800;
    color: #b91c1c;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap !important;
    letter-spacing: -0.01em;
}

.donor-profile-brand-sub {
    font-size: 0.74rem;
    color: #4b5563;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
}

.donor-profile-home-btn,
.donor-profile-home-link {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(16px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 4px 14px rgba(179, 18, 23, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.95) !important;
    color: #dc2626;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

.donor-profile-home-btn:hover,
.donor-profile-home-link:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.28) !important;
    border-color: #dc2626 !important;
}

/* --------------------------------------------------------------------------
   Donor Profile Card
   -------------------------------------------------------------------------- */
.donor-profile-card {
    background: rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.75) !important;
    border-radius: 28px !important;
    padding: 1.4rem 1.25rem 1.4rem 1.25rem;
    box-shadow: 0 20px 50px rgba(179, 18, 23, 0.12), 0 8px 24px rgba(0, 0, 0, 0.06), inset 0 1px 2px rgba(255, 255, 255, 0.95) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: donorCardFadeIn 0.4s ease-out;
}

@keyframes donorCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Screen reader only utility */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* 4 Details Grid (Only the required 4 items) */
.donor-profile-details-grid {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.35rem;
}

.donor-profile-detail-item {
    background: rgba(255, 255, 255, 0.35) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-radius: 18px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-align: left;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(179, 18, 23, 0.04), inset 0 1px 1px rgba(255, 255, 255, 0.8) !important;
}

.donor-profile-detail-item:hover {
    background: rgba(255, 255, 255, 0.48) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 8px 24px rgba(179, 18, 23, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.95) !important;
    transform: translateY(-2px);
}

.donor-profile-detail-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.donor-profile-detail-icon.blood {
    background: rgba(239, 68, 68, 0.14);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.donor-profile-detail-icon.name {
    background: rgba(59, 130, 246, 0.14);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
    overflow: hidden;
    position: relative;
}

.donor-profile-detail-icon.name.has-photo {
    background: #ffffff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 12px rgba(179, 18, 23, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.9) !important;
    padding: 0 !important;
}

.donor-profile-detail-icon.name img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.donor-profile-detail-icon.phone {
    background: rgba(16, 185, 129, 0.14);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.donor-profile-detail-icon.address {
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.donor-profile-detail-content {
    flex: 1;
    min-width: 0;
}

.donor-profile-detail-label {
    font-size: 0.75rem;
    color: #4b5563;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
    display: block;
}

.donor-profile-detail-val {
    font-size: 1.02rem;
    color: #111827;
    font-weight: 700;
    margin: 0.18rem 0 0 0;
    padding: 0;
    word-break: break-word;
    line-height: 1.35;
}

.donor-profile-detail-val.blood-highlight {
    font-family: 'Roboto', sans-serif;
    color: #dc2626;
    font-size: 1.25rem;
    font-weight: 800;
}

.donor-profile-phone-link {
    display: inline-block;
    color: #047857;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.25px;
    margin: 0;
    padding: 0;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.donor-profile-phone-link:hover {
    color: #065f46;
    text-decoration: underline;
}

.donor-profile-detail-val a {
    color: #059669;
    text-decoration: none;
    transition: color 0.2s;
}

.donor-profile-detail-val a:hover {
    color: #047857;
    text-decoration: underline;
}

/* Hidden Phone Badge */
.donor-profile-hidden-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #dc2626;
    font-weight: 700;
    background: rgba(220, 38, 38, 0.08);
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    border: 1px dashed rgba(220, 38, 38, 0.3);
}

/* --------------------------------------------------------------------------
   Action Buttons on Profile Page
   -------------------------------------------------------------------------- */
.donor-profile-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.donor-profile-btn {
    width: 100%;
    padding: 0.85rem 1.25rem;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 800;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.donor-profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

.donor-profile-btn:active {
    transform: translateY(0);
}

.donor-profile-btn.call {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}

.donor-profile-btn.call:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.donor-profile-btn.share {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    color: #ffffff;
}

.donor-profile-btn.share:hover {
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
}

.donor-profile-btn.admin-contact {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #ffffff;
}

.donor-profile-btn.home {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    color: #374151 !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04), inset 0 1px 1px rgba(255, 255, 255, 0.9) !important;
}

.donor-profile-btn.home:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #111827 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
}

/* --------------------------------------------------------------------------
   Not Found & Loading States
   -------------------------------------------------------------------------- */
.donor-profile-state-card {
    background: rgba(255, 255, 255, 0.48) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.75) !important;
    border-radius: 28px !important;
    padding: 2.5rem 1.5rem;
    box-shadow: 0 20px 50px rgba(179, 18, 23, 0.12), inset 0 1px 2px rgba(255, 255, 255, 0.95) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.donor-profile-state-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #dc2626;
}

.donor-profile-state-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.donor-profile-state-desc {
    font-size: 0.95rem;
    color: #4b5563;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    max-width: 320px;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Footer Note
   -------------------------------------------------------------------------- */
.donor-profile-footer {
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    margin-top: 1.5rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   SHARE MODAL & TOAST (Reused across Donor List and Profile Page)
   ========================================================================== */

/* Fullscreen Modal Backdrop */
.donor-share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    box-sizing: border-box;
}

.donor-share-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Modal Window */
.donor-share-modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 420px;
    padding: 1.5rem;
    box-sizing: border-box;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
    font-family: 'Hind Siliguri', sans-serif;
}

.donor-share-modal-overlay.active .donor-share-modal-content {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.donor-share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    margin-bottom: 1rem;
}

.donor-share-modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #111827;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.donor-share-modal-title i {
    color: #e11d48;
}

.donor-share-modal-close {
    background: transparent;
    border: none;
    font-size: 1.35rem;
    color: #6b7280;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.donor-share-modal-close:hover {
    background: #f3f4f6;
    color: #111827;
}

/* Modal Donor Preview Badge */
.donor-share-preview-card {
    background: linear-gradient(135deg, rgba(255, 241, 242, 0.9) 0%, rgba(255, 228, 230, 0.6) 100%);
    border: 1px solid #fecdd3;
    border-radius: 16px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.donor-share-preview-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #fecdd3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #e11d48;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.donor-share-preview-avatar.has-photo {
    border-color: #f43f5e;
}

.donor-share-preview-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.donor-share-preview-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: #881337;
    margin: 0;
    line-height: 1.2;
}

.donor-share-preview-sub {
    font-size: 0.75rem;
    color: #9f1239;
    font-weight: 600;
    margin: 0.2rem 0 0 0;
}

.donor-share-preview-badge {
    background: #e11d48;
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 0.3rem 0.65rem;
    border-radius: 9999px;
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.3);
    flex-shrink: 0;
}

/* Copy Link Row */
.donor-share-copy-wrap {
    margin-bottom: 1.15rem;
}

.donor-share-copy-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #4b5563;
    margin-bottom: 0.35rem;
    display: block;
    text-transform: uppercase;
}

.donor-share-copy-box {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    padding: 2px;
    transition: border-color 0.2s ease;
}

.donor-share-copy-box:focus-within {
    border-color: #e11d48;
}

.donor-share-url-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    min-width: 0;
}

.donor-share-copy-btn {
    background: #e11d48;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 0.55rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.donor-share-copy-btn:hover {
    background: #be123c;
}

/* Social Grid */
.donor-share-social-grid {
    display: grid;
    grid-cols: 2;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.donor-share-social-btn {
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.donor-share-social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.donor-share-social-btn.whatsapp {
    background: #25d366;
}

.donor-share-social-btn.facebook {
    background: #1877f2;
}

.donor-share-social-btn.messenger {
    background: #0084ff;
}

.donor-share-social-btn.telegram {
    background: #229ed9;
}

/* --------------------------------------------------------------------------
   Modern Toast / Snackbar
   -------------------------------------------------------------------------- */
.donor-share-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(16, 185, 129, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    padding: 0.75rem 1.4rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.35);
    z-index: 100002;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.donor-share-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --------------------------------------------------------------------------
   Donor Card Share Button Styling (On Donor List)
   -------------------------------------------------------------------------- */
.donor-share-btn {
    background: #ffffff !important;
    color: #e11d48 !important;
    border: 1.5px solid #fecdd3 !important;
    border-radius: 9999px !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.08) !important;
    transition: all 0.2s ease !important;
    cursor: pointer;
}

.donor-share-btn:hover {
    background: #fff1f2 !important;
    border-color: #fda4af !important;
    color: #be123c !important;
    transform: translateY(-1px) scale(1.01) !important;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.16) !important;
}

.donor-share-btn:active {
    transform: translateY(0) scale(0.99) !important;
}

/* --------------------------------------------------------------------------
   Donor Card Copy Data Button Styling (On Donor List)
   -------------------------------------------------------------------------- */
.donor-copy-btn {
    background: #ffffff !important;
    color: #334155 !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 9999px !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s ease !important;
    cursor: pointer;
}

.donor-copy-btn:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
    transform: translateY(-1px) scale(1.01) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.donor-copy-btn:active {
    transform: translateY(0) scale(0.99) !important;
}

.donor-share-btn,
.donor-copy-btn {
    white-space: nowrap !important;
    font-size: 0.8rem !important;
    padding: 0.5rem 0.4rem !important;
}

@media (min-width: 640px) {
    .donor-share-btn,
    .donor-copy-btn {
        font-size: 0.875rem !important;
        padding: 0.5rem 0.75rem !important;
    }
}

.dark .donor-share-btn {
    background: #1f2937 !important;
    border-color: #4b5563 !important;
    color: #fb7185 !important;
}

.dark .donor-copy-btn {
    background: #1f2937 !important;
    border-color: #4b5563 !important;
    color: #cbd5e1 !important;
}
