/* Profile Page Styles */
.profile-page-content {
    padding: 2rem 1rem;
    margin: 0 auto;
    max-width: 800px;
    width: 100%;
    min-height: calc(100vh - 200px);
    overflow: visible;
    height: auto;
}

.profile-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.profile-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid var(--primary-color);
    object-fit: cover;
    object-position: center;
}

.profile-photo[src$=".svg"] {
    object-fit: contain;
    background: var(--background-color);
    padding: 0.5rem;
}

.profile-header h2 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.profile-header p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

.profile-teams-section {
    margin-bottom: 2rem;
}

.profile-teams-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.teams-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: none !important;
    overflow-y: visible !important;
    overflow-x: visible !important;
    height: auto !important;
}

.no-teams {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem;
}

.team-item {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
    min-height: auto;
}

.team-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.team-item-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    gap: 0.75rem;
    width: 100%;
    overflow: visible;
}

.team-item-info {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    flex: 1 1 0% !important;
    min-width: 0 !important;
    overflow: hidden;
    max-width: 100%;
}

.team-generation-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.team-pokemon-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.team-item-actions {
    display: flex !important;
    gap: 0.5rem;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    flex-shrink: 0 !important;
    flex: 0 0 auto !important;
    align-items: center;
    width: auto !important;
}

.btn-open-team,
.btn-delete-team {
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-delete-team {
    padding: 0.5rem;
    min-width: 36px;
    aspect-ratio: 1;
}

.btn-open-team {
    background: var(--primary-color);
    color: white;
}

.btn-open-team:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.btn-delete-team {
    background: var(--danger-color);
    color: white;
}

.btn-delete-team:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.team-preview {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: auto;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
    min-height: auto;
    overflow: visible;
}

.team-preview-sprite {
    width: 64px;
    height: 64px;
    object-fit: contain;
    justify-self: center;
}

.no-pokemon-preview {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.9rem;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}

.logout-btn,
.delete-account-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.logout-btn {
    background: var(--text-secondary);
    color: white;
}

.logout-btn:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

.delete-account-btn {
    background: var(--danger-color);
    color: white;
}

.delete-account-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .profile-page-content {
        padding: 1.5rem 1rem;
    }

    .team-item-header {
        display: flex !important;
        flex-wrap: nowrap !important;
        flex-direction: row !important;
        gap: 0.5rem;
        align-items: center;
    }

    .team-item-info {
        display: flex !important;
        flex-wrap: nowrap !important;
        flex: 1 1 0% !important;
        min-width: 0 !important;
        gap: 0.5rem;
        overflow: hidden;
        flex-shrink: 1;
    }
    
    .team-generation-badge {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
        flex-shrink: 0;
    }

    .team-pokemon-count {
        font-size: 0.8rem;
        flex-shrink: 0;
    }

    .team-item-actions {
        display: flex !important;
        flex-wrap: nowrap !important;
        flex-shrink: 0 !important;
        flex: 0 0 auto !important;
        gap: 0.4rem;
        width: auto !important;
        max-width: none !important;
    }

    .btn-open-team {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
        gap: 0.3rem;
        flex: 0 1 auto;
        white-space: nowrap;
    }

    .btn-delete-team {
        flex: 0 0 auto !important;
        min-width: 32px;
        padding: 0.4rem;
        font-size: 0.75rem;
        width: auto !important;
    }

    .team-preview {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: auto;
        gap: 0.5rem;
        min-height: auto;
    }

    .team-preview-sprite {
        width: 72px;
        height: 72px;
    }
}

/* Very small screens - keep on one line but reduce sizes further */
@media (max-width: 480px) {
    .team-item-header {
        flex-wrap: nowrap;
        gap: 0.4rem;
    }

    .team-item-info {
        flex: 1;
        min-width: 0;
        gap: 0.4rem;
    }

    .team-generation-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    .team-pokemon-count {
        font-size: 0.75rem;
    }

    .team-item-actions {
        flex-shrink: 0;
        gap: 0.3rem;
    }

    .btn-open-team {
        padding: 0.35rem 0.5rem;
        font-size: 0.7rem;
        gap: 0.25rem;
    }

    .btn-delete-team {
        min-width: 28px;
        padding: 0.35rem;
        font-size: 0.7rem;
    }
}


