/* Public Profile - css/pages/public_profile.css */

/* Profile Header */
.profile-header {
    text-align: center;
    padding: 1.25rem 1rem 1rem;
    background: var(--gradient-card);
    border-radius: var(--radius-lg);
    margin-top: 3.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border-top: 3px solid transparent;
    border-image: var(--gradient-adventure) 1;
    border-image-slice: 1;
}

/* Connected Buddy Button - Gold */
.btn-buddy-connected {
    background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    color: #000 !important;
    border: none !important;
}

/* Badge Chips */
.badge-chip {
    text-align: center;
    min-width: 60px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.badge-chip:hover {
    transform: scale(1.1);
}

.badge-icon-bg {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,107,53,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.25rem;
}

.badge-icon-bg i {
    color: var(--sunset-orange);
}

.badge-name {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.badge-progress {
    width: 100%;
    height: 3px;
    background: rgba(0,0,0,0.1);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.badge-progress-bar {
    height: 100%;
    background: var(--sunset-orange);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Badge Modal */
.badge-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.badge-modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    max-width: 320px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.badge-modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.badge-modal-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,107,53,.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--sunset-orange);
}

.badge-modal-header h3 {
    flex: 1;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.badge-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.1);
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.badge-modal-close:hover {
    background: rgba(0,0,0,0.2);
}

.badge-modal-body {
    padding: 1.25rem;
}

.badge-description {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.badge-progress-section {
    margin-bottom: 1rem;
}

.badge-progress-section label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-progress-bar-large {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.badge-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--sunset-orange), var(--adventure-green));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.badge-progress-text {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

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

.badge-actions .btn {
    flex: 1;
}

.profile-avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.profile-avatar-container .avatar {
    width: 96px;
    height: 96px;
    border-radius: 70%;
    font-size: 1.5rem;
    border: 3px solid var(--bg-card);
    box-shadow: var(--shadow-sm);
    object-fit: cover;
    object-position: center 30%;
    transform: scale(0.8);
}

/* Online Indicator */
.profile-online-dot {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--adventure-green);
    border: 3px solid var(--bg-card);
}

/* Name & Tagline */
#publicProfileName {
    font-family: 'Lora', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

#publicProfileTagline {
    color: var(--text-muted);
    font-size: var(--font-sm);
    margin-bottom: 0.25rem;
}

#publicProfileBase {
    font-size: var(--font-xs);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

/* Stats */
.profile-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin: 1.25rem 0;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.stat-item { text-align: center; }
.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--sunset-orange);
    font-family: 'Lora', serif;
    line-height: 1;
}
.stat-label {
    font-size: var(--font-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* Action Buttons */
.public-profile-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

/* Badges Strip */
.badges-strip {
    display: flex;
    gap: 0.625rem;
    overflow-x: auto;
    padding: 0.875rem 0;
    margin-bottom: 1.25rem;
    scrollbar-width: none;
}

.badges-strip::-webkit-scrollbar { display: none; }

.badge-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.badge-chip:hover { transform: scale(1.08); }

.badge-chip-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-lg);
    background: var(--gradient-adventure);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.125rem;
}

.badge-chip-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 3.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tabs */
.profile-tabs {
    display: flex;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.profile-tab {
    flex: 1;
    padding: 0.875rem;
    background: none;
    border: none;
    font-weight: 500;
    font-size: var(--font-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-muted);
}

.profile-tab.active {
    background: var(--gradient-sunset);
    color: #fff;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Memories Grid (profile) */
.memories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.memory-grid-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    cursor: pointer;
    position: relative;
    height: 120px;
}

.memory-grid-item img,
.memory-grid-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.memory-grid-item:hover img,
.memory-grid-item:hover video { transform: scale(1.05); }

.memory-grid-item .video-indicator {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    color: #fff;
    font-size: 0.7rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

/* Trips Grid (public profile) */
.trips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.875rem;
}

/* About Tab */
.about-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: var(--font-sm);
}

.about-row:last-child { border-bottom: none; }
.about-row i { width: 1.5rem; text-align: center; color: var(--sunset-orange); }

/* Responsive */
@media (max-width: 480px) {
    .profile-stats { gap: 1.5rem; }
    .stat-number  { font-size: 1.5rem; }
    .memories-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
}
