/**
 * Friends System Styles
 * Styles for friend requests, privacy settings, and related UI elements
 */

/* ==========================================================================
   Friend Action Buttons (Profile Header)
   ========================================================================== */

.profile-friend-action {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.friend-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.friend-status-badge.friends {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.friend-status-badge.pending {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.friend-status-badge.pending-received {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.friend-request-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    min-width: auto;
}

.btn-add-friend,
.btn-accept-request {
    background-color: var(--primary-color);
    color: white;
}

.btn-add-friend:hover,
.btn-accept-request:hover {
    background-color: var(--secondary-color);
}

.btn-add-friend svg,
.btn-cancel-request svg,
.btn-remove-friend svg {
    margin-right: 0.25rem;
}

.login-prompt {
    margin-top: 1rem;
    color: var(--text-medium);
    font-size: 0.875rem;
}

.login-prompt a {
    color: var(--primary-color);
    font-weight: 500;
}

/* ==========================================================================
   Friend Requests Section (Own Profile)
   ========================================================================== */

.friend-requests-section {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05), rgba(52, 152, 219, 0.02));
    border: 1px solid rgba(52, 152, 219, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.friend-requests-section .section-header {
    margin-bottom: 1rem;
}

.friend-requests-section .section-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0;
}

.friend-requests-section .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: #3498db;
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.friend-requests-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.friend-request-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.friend-request-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.friend-request-user .friend-avatar-link {
    display: block;
    flex-shrink: 0;
}

.friend-request-user .friend-avatar-link:hover .friend-avatar {
    box-shadow: 0 0 0 3px var(--primary-color);
}

.friend-request-user .friend-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    transition: box-shadow 0.2s ease;
}

.friend-info {
    display: flex;
    flex-direction: column;
}

.friend-info .friend-name {
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
}

.friend-info .friend-name:hover {
    color: var(--primary-color);
}

.friend-info .request-time {
    font-size: 0.8125rem;
    color: var(--text-light);
}

.friend-request-item .friend-request-actions {
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .friend-request-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .friend-request-item .friend-request-actions {
        width: 100%;
    }

    .friend-request-item .friend-request-actions .btn {
        flex: 1;
    }
}

/* ==========================================================================
   Privacy Settings Section
   ========================================================================== */

.privacy-display {
    padding: 1rem 0;
}

.privacy-description {
    color: var(--text-medium);
    margin-bottom: 1rem;
}

.privacy-legend {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-medium);
}

.privacy-legend li {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Privacy Preview Buttons */
.privacy-preview-buttons {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 12px;
}

.privacy-preview-buttons .preview-label {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.preview-btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.preview-btn-group .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
}

.btn-outline {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Privacy Preview Banner */
.privacy-preview-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.preview-banner-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.privacy-preview-banner .btn {
    background: white;
    color: #2980b9;
    border: none;
    flex-shrink: 0;
}

.privacy-preview-banner .btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

@media (max-width: 600px) {
    .privacy-preview-banner {
        flex-direction: column;
        text-align: center;
    }

    .preview-btn-group {
        flex-direction: column;
    }

    .preview-btn-group .btn {
        width: 100%;
        justify-content: center;
    }
}

.privacy-settings-display {
    display: grid;
    gap: 0.75rem;
}

.privacy-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.privacy-field {
    font-weight: 500;
    color: var(--text-dark);
}

.privacy-value {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.privacy-value.privacy-public {
    background: rgba(29, 131, 72, 0.1);
    color: var(--primary-color);
}

.privacy-value.privacy-friends {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.privacy-value.privacy-private {
    background: rgba(149, 165, 166, 0.2);
    color: var(--text-medium);
}

/* Privacy Settings Form */
.edit-privacy-form {
    padding: 1rem 0;
}

.privacy-form-group {
    margin-bottom: 1.25rem;
}

.privacy-form-group > label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.privacy-radio-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.privacy-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.privacy-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.privacy-radio .radio-label {
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-medium);
    transition: all 0.2s ease;
}

.privacy-radio input[type="radio"]:checked + .radio-label {
    background: rgba(29, 131, 72, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.privacy-radio:hover .radio-label {
    background: var(--bg-lighter);
    border-color: var(--border-color);
}

/* ==========================================================================
   Private Field Indicator
   ========================================================================== */

.private-field-locked {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-light);
    font-size: 0.875rem;
    font-style: italic;
}

.private-field-locked svg {
    opacity: 0.6;
}

.profile-contact-info {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-medium);
    font-size: 0.9375rem;
}

.contact-item a {
    color: var(--primary-color);
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Contact items inside profile header (green background) */
.profile-header .profile-contact-info {
    position: relative;
    z-index: 10;
}

.profile-header .profile-contact-info .contact-item {
    background: rgba(255, 255, 255, 0.15) !important;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 10;
}

.profile-header .profile-contact-info .contact-item svg {
    color: rgba(255, 255, 255, 0.8) !important;
}

.profile-header .profile-contact-info .contact-item a {
    color: #ffffff !important;
    text-decoration: underline;
    cursor: pointer;
    position: relative;
    z-index: 11;
    pointer-events: auto;
}

.profile-header .profile-contact-info .contact-item a:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Private Content Notice */
.private-content-notice {
    text-align: center;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 12px;
}

.private-content-notice svg {
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.private-content-notice p {
    color: var(--text-medium);
    margin-bottom: 1rem;
}

/* ==========================================================================
   Friends List Grid
   ========================================================================== */

.friends-section {
    margin-top: 2rem;
}

.friends-section .section-header h2 .count {
    font-weight: 400;
    color: var(--text-light);
}

.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.friend-card {
    text-align: center;
}

.friend-card a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 1rem;
    border-radius: 12px;
    transition: background-color 0.2s ease;
}

.friend-card a:hover {
    background: var(--bg-light);
}

.friend-card .friend-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.5rem;
}

.friend-card .friend-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-dark);
    word-break: break-word;
}

.no-friends {
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
}

/* ==========================================================================
   Notification Toast
   ========================================================================== */

.friend-notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 1rem 1.5rem;
    background: var(--text-dark);
    color: white;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.friend-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.friend-notification.success {
    background: var(--primary-color);
}

.friend-notification.error {
    background: #e74c3c;
}

/* ==========================================================================
   Loading Spinner
   ========================================================================== */

.btn.loading {
    position: relative;
    pointer-events: none;
}

.btn .spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 734px) {
    .privacy-radio-group {
        flex-direction: column;
    }

    .privacy-radio .radio-label {
        width: 100%;
        text-align: center;
    }

    .privacy-legend {
        flex-direction: column;
        gap: 0.5rem;
    }

    .friends-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .friend-card .friend-avatar {
        width: 50px;
        height: 50px;
    }

    .profile-friend-action {
        width: 100%;
    }

    .profile-friend-action .btn {
        width: 100%;
    }
}

/* ==========================================================================
   Delete Account Section
   ========================================================================== */

.delete-account-section {
    border: 1px solid rgba(231, 76, 60, 0.2);
    background: rgba(231, 76, 60, 0.02);
}

.delete-account-section .section-header h2 {
    color: #c0392b;
}

.delete-account-content {
    padding: 1rem 0;
}

.delete-warning {
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* Delete Account Link (subtle, inside Privacy section) */
.delete-account-link-wrapper {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.delete-account-link {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 0.8125rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: color 0.2s ease;
    text-decoration: none;
}

.delete-account-link:hover {
    color: #c0392b;
    text-decoration: underline;
}

/* Profile Logout Section */
.profile-logout-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.logout-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-medium);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.logout-link:hover {
    color: var(--text-dark);
    background: var(--bg-light);
}

.logout-link svg {
    opacity: 0.7;
}

.logout-link:hover svg {
    opacity: 1;
}

/* Delete Account Modal */
.delete-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.delete-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.delete-modal-content h3 {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    color: #c0392b;
}

.delete-modal-content > p {
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.delete-reviews-option {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.delete-reviews-option > p {
    margin: 0 0 1rem;
    color: var(--text-dark);
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.radio-option:hover {
    background: rgba(29, 131, 72, 0.05);
}

.radio-option:last-child {
    margin-bottom: 0;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.radio-option span {
    color: var(--text-dark);
    font-size: 0.9375rem;
}

.delete-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.delete-modal-actions .btn {
    min-width: 120px;
}

/* ==========================================================================
   Collapsible Sections
   ========================================================================== */

.collapsible-section .section-header-collapsible {
    cursor: pointer;
    user-select: none;
}

.collapsible-section .section-header-collapsible h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.collapsible-section .collapse-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    color: var(--text-medium);
}

.collapsible-section .collapse-icon.rotated {
    transform: rotate(180deg);
}

.collapsible-section .section-content {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    max-height: 2000px;
    opacity: 1;
}

.collapsible-section .section-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* ==========================================================================
   Friends List Modal
   ========================================================================== */

.stat-clickable {
    cursor: pointer;
    transition: var(--transition-fast);
    border-radius: 8px;
}

.stat-clickable:hover {
    background: rgba(255, 255, 255, 0.15);
}

.friends-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.friends-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.friends-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.friends-modal-content *,
.friends-modal-content *::before,
.friends-modal-content *::after {
    box-sizing: border-box;
}

.friends-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.friends-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.friends-modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: var(--transition-fast);
}

.friends-modal-close:hover {
    color: var(--text-dark);
}

.friends-modal-search {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.friends-modal-search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9375rem;
    transition: var(--transition-fast);
}

.friends-modal-search input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.friends-modal-search svg {
    position: absolute;
    left: 2.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.friends-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.friends-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem;
    color: var(--text-medium);
}

.friends-loading .spinner {
    animation: spin 1s linear infinite;
}

.friends-loading .spinner circle {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: 0;
    stroke-linecap: round;
}

.friends-list {
    display: flex;
    flex-direction: column;
}

.friend-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    text-decoration: none;
    transition: var(--transition-fast);
}

.friend-list-item:hover {
    background: var(--bg-light);
}

.friend-list-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.friend-list-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
}

.friends-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-medium);
}

.friends-empty p {
    margin: 0;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 576px) {
    .friends-modal-content {
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: none;
    }

    .friend-list-item {
        padding: 0.75rem 1rem;
    }

    .friend-list-avatar {
        width: 44px;
        height: 44px;
    }
}

/* ==========================================================================
   Enhanced Mobile Optimizations for Friends & Profile
   ========================================================================== */

@media (max-width: 734px) {
    /* Friend requests panel mobile */
    .friend-requests-panel {
        padding: 1.25rem;
        border-radius: 0;
    }

    .friend-requests-header {
        font-size: 1rem;
        padding-bottom: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .friend-request-item {
        padding: 0.875rem;
        gap: 0.875rem;
        border-radius: 12px;
    }

    .friend-request-item .request-avatar {
        width: 48px;
        height: 48px;
    }

    .friend-request-item .request-name {
        font-size: 0.9375rem;
    }

    .friend-request-item .request-time {
        font-size: 0.75rem;
    }

    .request-actions {
        flex-direction: row;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }

    .request-actions .btn {
        min-height: 40px;
        padding: 8px 16px;
        font-size: 0.8125rem;
    }

    /* Privacy settings mobile improvements */
    .privacy-settings-section {
        padding: 1.25rem;
    }

    .privacy-preview-buttons {
        margin-bottom: 1.25rem;
        padding: 1rem;
        border-radius: 12px;
    }

    .privacy-preview-buttons p {
        font-size: 0.875rem;
        margin-bottom: 0.75rem;
    }

    .preview-btn-group {
        gap: 0.625rem;
    }

    .preview-btn-group .btn {
        padding: 10px 16px;
        font-size: 0.875rem;
        min-height: 44px;
    }

    .preview-banner {
        padding: 0.875rem;
        font-size: 0.875rem;
        margin-bottom: 1.25rem;
        border-radius: 10px;
    }

    .preview-banner a {
        margin-left: 0.75rem;
    }

    /* Privacy display mobile */
    .privacy-display {
        padding: 0;
    }

    .privacy-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
        padding: 0.875rem 0;
    }

    .privacy-field {
        font-size: 0.875rem;
    }

    .privacy-value {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }

    /* Privacy edit form mobile */
    #edit-privacy-form {
        padding: 1rem;
        border-radius: 12px;
    }

    .privacy-settings-form .privacy-setting {
        padding: 1rem 0;
    }

    .privacy-setting-label {
        font-size: 0.9375rem;
        margin-bottom: 0.75rem;
    }

    .privacy-radio-group {
        gap: 0.5rem;
    }

    .privacy-radio .radio-label {
        padding: 10px 14px;
        font-size: 0.8125rem;
        border-radius: 8px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Delete account section mobile */
    .delete-account-section {
        margin-top: 1.5rem;
    }

    .delete-account-content {
        padding: 0.75rem 0;
    }

    .delete-warning {
        font-size: 0.9375rem;
        margin-bottom: 1.25rem;
    }

    .btn-danger {
        width: 100%;
        min-height: 48px;
    }

    /* Delete modal mobile */
    .delete-modal-content {
        padding: 1.5rem;
        width: 95%;
        max-width: none;
        margin: 1rem;
    }

    .delete-modal-content h3 {
        font-size: 1.375rem;
    }

    .delete-modal-content > p {
        font-size: 0.9375rem;
    }

    .delete-reviews-option {
        padding: 1rem;
    }

    .delete-reviews-option > p {
        font-size: 0.9375rem;
    }

    .radio-option {
        padding: 0.875rem;
    }

    .radio-option span {
        font-size: 0.875rem;
    }

    .delete-modal-actions {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }

    .delete-modal-actions .btn {
        width: 100%;
        min-height: 48px;
    }

    /* Collapsible sections mobile */
    .collapsible-section .section-header-collapsible {
        padding: 0.5rem 0;
        -webkit-tap-highlight-color: transparent;
    }

    .collapsible-section .section-header-collapsible h2 {
        font-size: 1.125rem;
    }

    .collapsible-section .collapse-icon {
        width: 20px;
        height: 20px;
    }

    /* Friends grid mobile */
    .friends-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .friend-card a {
        padding: 0.75rem;
    }

    .friend-card .friend-avatar {
        width: 48px;
        height: 48px;
    }

    .friend-card .friend-name {
        font-size: 0.75rem;
    }

    /* Notification toast mobile */
    .friend-notification {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        transform: translateX(0) translateY(100px);
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
        text-align: center;
    }

    .friend-notification.show {
        transform: translateX(0) translateY(0);
    }
}

/* Very small screens */
@media (max-width: 375px) {
    .friends-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .friend-card .friend-avatar {
        width: 44px;
        height: 44px;
    }

    .privacy-radio .radio-label {
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    .request-actions {
        flex-direction: column;
    }

    .request-actions .btn {
        width: 100%;
    }
}

/* Touch device optimizations for friends features */
@media (hover: none) and (pointer: coarse) {
    .friend-card a:hover {
        background: transparent;
    }

    .friend-card a:active {
        background: var(--bg-light);
    }

    .friend-list-item:hover {
        background: transparent;
    }

    .friend-list-item:active {
        background: var(--bg-light);
    }

    .privacy-radio .radio-label:hover {
        border-color: var(--border-color);
    }

    .privacy-radio input[type="radio"]:checked + .radio-label {
        border-color: var(--primary-color);
    }

    .stat-clickable:hover {
        background: transparent;
    }

    .stat-clickable:active {
        background: rgba(255, 255, 255, 0.15);
    }
}

/* ==========================================================================
   Personal Golf Map Section
   ========================================================================== */

.map-course-count {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--text-medium);
    margin-left: 0.5rem;
}

#profile-courses-map {
    background: #f5f5f5;
}

/* Map popup styling (inherits from archive map styles) */
#profile-courses-map .course-map-popup {
    text-align: center;
    padding: 0.5rem;
}

#profile-courses-map .course-map-popup .popup-image {
    margin-bottom: 0.75rem;
    border-radius: 4px;
    overflow: hidden;
}

#profile-courses-map .course-map-popup .popup-image img {
    width: 100%;
    height: auto;
    display: block;
}

#profile-courses-map .course-map-popup h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

#profile-courses-map .course-map-popup .rating {
    display: block;
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-bottom: 0.5rem;
}

#profile-courses-map .course-map-popup a {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
}

#profile-courses-map .course-map-popup a:hover {
    background: var(--primary-color-dark);
}
