/* user-profile.css */

.profile-container {
    background: var(--color-white);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.profile-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.profile-info {
    display: flex;
    align-items: center;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-right: 1.5rem;
    overflow: hidden;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar span {
    font-size: 2rem;
    font-weight: bold;
    color: #9ca3af;
}

.profile-tabs {
    display: flex;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0 1.5rem;
}

.tab-button {
    padding: 0.75rem 1rem;
    margin-right: 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--color-text);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-button:hover {
    color: var(--color-primary);
}

.tab-button.active {
    color: var(--color-highlight);
    border-bottom-color: var(--color-highlight);
}

.tab-content {
    padding: 1.5rem;
}

.tab-content.hidden {
    display: none;
}

/* Event cards */
.event-card {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s, transform 0.2s;
}

.event-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.going {
    background-color: #D1FAE5;
    color: #065F46;
}

.badge.interested {
    background-color: #DBEAFE;
    color: #1E40AF;
}

.badge.not-going {
    background-color: #FEE2E2;
    color: #B91C1C;
}

/* Friend request buttons */
.add-friend-btn,
.remove-friend-btn,
.accept-request-btn,
.reject-request-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.add-friend-btn {
    background-color: var(--color-highlight);
    color: white;
}

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

.remove-friend-btn {
    background-color: white;
    color: var(--color-text);
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.remove-friend-btn:hover {
    background-color: #f3f4f6;
}

.accept-request-btn {
    background-color: #10B981;
    color: white;
}

.accept-request-btn:hover {
    background-color: #059669;
}

.reject-request-btn {
    background-color: #EF4444;
    color: white;
}

.reject-request-btn:hover {
    background-color: #DC2626;
}

/* Friend search page */
.search-form {
    margin-bottom: 2rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-highlight);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

.search-button {
    background-color: var(--color-highlight);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-button:hover {
    background-color: var(--color-secondary);
}

.search-results {
    margin-top: 2rem;
}

.user-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    background-color: white;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s;
}

.user-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 1rem;
    overflow: hidden;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-weight: 500;
    color: var(--color-text);
}

.user-id {
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-top: 0.25rem;
}

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

.view-profile {
    color: var(--color-highlight);
    text-decoration: none;
    transition: text-decoration 0.2s;
}

.view-profile:hover {
    text-decoration: underline;
}

/* Suggestions section */
.suggestions-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.suggestion-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    background-color: white;
    transition: box-shadow 0.2s, transform 0.2s;
}

.suggestion-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.suggestion-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-bottom: 1rem;
    overflow: hidden;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.suggestion-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.suggestion-name {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    text-align: center;
}

.suggestion-actions {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Loading spinners and states */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--color-highlight);
    animation: spin 1s linear infinite;
}

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

.loading-text {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    padding: 2rem 0;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
    }

    .profile-info {
        margin-bottom: 1rem;
    }

    .friend-status {
        width: 100%;
    }

    .friend-status button {
        width: 100%;
    }

    .tab-button {
        padding: 0.5rem 0.75rem;
        margin-right: 0.5rem;
        font-size: 0.875rem;
    }

    .suggestions-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    .profile-info {
        flex-direction: column;
        text-align: center;
    }

    .profile-avatar {
        margin-right: 0;
        margin-bottom: 1rem;
    }

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

    .suggestions-grid {
        grid-template-columns: 1fr;
    }
}

/* Friend cards */
.friend-card {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
}

.friend-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.friend-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 0.75rem;
    overflow: hidden;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.friend-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
