/* district/district_profile/district-about.css */

/* --- Styles for "About Me" Overlay --- */
.about-me-overlay {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    top: calc(20% - 100px);
    
    background: #ffffff;
    color: #1c1c1e;
    z-index: 25;
    
    display: flex;
    flex-direction: column;
    padding: 0;
    text-align: left;
    
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    
    transform: translateY(101%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.4s;
    visibility: hidden;
    
    /* CRITICAL FIX: Ignore clicks when hidden */
    pointer-events: none;
}

.about-me-overlay.active {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0s;
    /* Re-enable clicks when active */
    pointer-events: auto;
}

.about-me-overlay .dragger-handle {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 5px;
    background: rgba(0,0,0,0.15);
    border-radius: 2.5px;
    z-index: 26;
    cursor: grab;
}

.about-me-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 20px;
    padding-top: calc(20px + env(safe-area-inset-top));
    flex-shrink: 0;
}

.about-me-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #e0e0e0;
    flex-shrink: 0;
    border: 3px solid #e5e5ea; /* Default offline/neutral border */
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.about-me-avatar.online {
    border-color: #34c759; /* Green border for online */
}

.about-me-user-info {
    flex-grow: 1;
    min-width: 0;
}

.about-me-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    word-break: break-word;
}

.about-me-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 29px;
}

.about-me-badges .user-card-age-container,
.about-me-badges .user-card-vip-badge,
.about-me-badges .user-card-mayor-badge {
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    line-height: 1.5;
    border-style: solid;
    border-width: 1px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    text-shadow: none;
}

.about-me-badges .user-card-age-container {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}
.about-me-badges .user-card-age-expanded {
    color: #333;
    font-size: 0.8rem;
    font-weight: 500;
    text-shadow: none;
}

.about-me-badges .user-card-vip-badge {
    background: var(--vip-gradient, linear-gradient(135deg, #FF4D4D, #FFA1A1));
    border-color: rgba(255, 255, 255, 0.5);
}
.about-me-badges .user-card-vip-badge span {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-size: 0.8rem;
    font-weight: 700;
}

.about-me-badges .user-card-mayor-badge {
    background: linear-gradient(45deg, #3b82f6, #60a5fa);
    border-color: #3b82f6;
}
.about-me-badges .user-card-mayor-badge span {
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

.close-about-overlay {
    position: static;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
}
.close-about-overlay:hover {
    background-color: #e0e0e0;
}
.close-about-overlay img {
    width: 16px;
    height: 16px;
}

.about-me-scrollable-content {
    overflow-y: auto;
    flex-grow: 1;
    padding: 1.5rem 20px;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    touch-action: pan-y;
    overscroll-behavior: contain;
}

.about-me-section-title {
    font-size: 20px; /* Updated size */
    font-weight: 600; /* Semi-bold */
    color: #1c1c1e;
    margin: 0 0 0.5rem 0;
    text-align: left;
    text-transform: none; /* Removed uppercase */
    line-height: 1.2;
    letter-spacing: normal;
}
#about-me-gifts-title, #about-me-achievements-title {
    margin-top: 2rem;
}

/* --- NEW: Highlight Block for "About Me" Text --- */
.about-me-highlight-block {
    background-color: transparent; 
    padding: 0;
    border-radius: 0;
    margin-bottom: 1.5rem;
    color: #1c1c1e;
}

.about-me-highlight-block .about-me-section-title {
    color: #1c1c1e;
}

.user-card-about-overlay-text {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.4;
    color: #555;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* --- Details Section Styles (also part of the overlay) --- */
.extended-profile-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 1rem;
}
.extended-profile-details:empty {
    display: none;
}

/* UPDATED: Details header matches other section titles */
.details-header {
    font-size: 20px; /* Updated size */
    font-weight: 600; /* Semi-bold */
    color: #1c1c1e;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    text-align: left;
    text-transform: none; /* Removed uppercase */
    line-height: 1.2;
    letter-spacing: normal;
}

/* Category Title Style Update - Sticker */
.extended-fields-category-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #636366; /* Soft Grey */
    background-color: #e4e4e9; /* Light grey sticker bg */
    padding: 6px 12px;
    border-radius: 20px; /* Increased radius for iOS style pill */
    margin: 1.5rem 0 0.5rem 0;
    letter-spacing: 0.5px;
    display: inline-block;
    width: fit-content;
    grid-column: 1 / -1; /* Span full row */
}
.extended-fields-category-title:first-child {
    margin-top: 0;
}

.detail-item {
    font-size: 0.9rem;
    background: #f7f7f7;
    padding: 12px 16px;
    border-radius: 24px; /* iOS 26 style: deeply rounded */
}
.detail-item .label {
    color: #8a8a8e;
    display: block;
    font-size: 0.75rem;
    margin-bottom: 2px;
    padding-left: 2px;
}
.detail-item .value {
    color: #1c1c1e;
    font-weight: 500;
    word-wrap: break-word;
    padding-left: 2px;
}

/* --- Hobbies (Увлечения) Custom Styles --- */
.hobbies-field-group {
    grid-column: 1 / -1; /* Full width */
    margin-bottom: 1.5rem; /* Increased spacing */
    padding: 0 0.25rem;
    background: transparent; /* Ensuring transparency */
}

.hobbies-subheader {
    font-size: 1rem;
    font-weight: 500;
    color: #1c1c1e;
    margin: 0 0 0.75rem 0;
    text-align: left;
}

.hobbies-pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.hobby-pill {
    background: #f2f2f7; /* Light gray background */
    border: none; /* No border */
    padding: 8px 16px; 
    border-radius: 20px; /* Pill shape */
    font-size: 0.95rem;
    font-weight: 500;
    color: #1c1c1e;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: none; /* No shadow */
}

.hobby-pill img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.hobby-pill.highlight {
    background: #FF4D4D;
    color: white;
}
.hobby-pill.highlight img {
    filter: brightness(0) invert(1);
}


/* --- Gifts Section Styles --- */
.gifts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    padding: 1rem 0;
}
.gifts-grid .placeholder-text {
    grid-column: 1 / -1;
    color: #8a8a8e;
    padding: 1rem;
    text-align: center;
}
.gift-card {
    background: transparent;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}
.gift-card:hover { transform: translateY(-2px); }
.gift-card-icon {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f5;
    border-radius: 24px;
    padding: 0.5rem;
}
.gift-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* --- Achievements Overlay Grid --- */
.achievements-grid-overlay {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 items per row */
    gap: 12px; /* Equal spacing */
    padding: 1rem 0;
    width: 100%;
}

.achiev-overlay-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    width: 100%;
    padding: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
    gap: 6px;
}
.achiev-overlay-item:active .achiev-overlay-icon {
    transform: scale(0.98);
}

.achiev-overlay-icon {
    width: 100%;
    aspect-ratio: 1; /* Perfect square */
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    overflow: hidden;
    border-radius: 20px; /* Rounded corners 20px */
}
.achiev-overlay-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.achiev-overlay-name {
    font-size: 0.8rem;
    color: #1c1c1e;
    font-weight: 600;
    line-height: 1.2;
    padding: 0 4px;
    word-wrap: break-word;
    width: 100%;
}

/* --- Special Category Blocks for About Overlay --- */
.special-category-block {
    grid-column: 1 / -1; /* Full width */
    background-color: #E0D3AA; /* Beige background */
    border-radius: 24px; /* Rounded corners */
    padding: 1.25rem;
    margin-top: 1rem;
}

.special-category-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

/* Override header style inside special block */
.special-category-block .extended-fields-category-title {
    background-color: transparent;
    padding: 0;
    color: #1c1c1e;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

/* Override item style inside special block for readability */
.special-category-block .detail-item {
    background-color: rgba(255, 255, 255, 0.6); /* Semi-transparent white */
}